Question

I'm working on a project at office and also from home, the project use GIT as CVS since others work on this project too. I have modified some files in home and forget to commit and push them to the repository, I touch the same files at office and pushed them to the repository before leave and now don't know what to do in order to get the latest files which are in the repository (the office modified files). I use SmartGit application and when I hit pull I get the message as image show, what is the right action to take in order to not broke the repository or others work?

enter image description here

Was it helpful?

Solution

You are using Git and it's designed to work offline and handle such situations well.

To resolve your issue, you may either commit your work at home, then pull and rebase. Or, referring to your screenshot, you may stash away local changes (SmartGit suggests to do that in case of a modified working copy), pull/merge and reapply the stash (again, automatically done by SmartGit).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top