========================================================== =============================== Original blog, reprinted please declare the source of Electronic coffee (original id blue rock) ========================================================== ================================
From: http://www.freeminded.org/index.php/2011/04/updating-local-git-repository-to-most-recent-version/
I use git to manage some of my software. This idea is simple. After a developer updates it, I only need to update the latest head from the local repository to the remote branch, in this way, I have the latest materials locally.
How can this problem be solved?
$ Git pull
Execute the above command in the root directory of your project (. Git directory) to achieve this effect. (To See. Git, You need to execute "ls-lah" to display hidden files ).
You may get an error:
5764cf9 .. 5d8cc2a master-> origin/masterupdating 5764cf9 .. 5d8cc2aerror: Your local changes '. oppbuildspec 'wocould be overwritten by merge. aborting. please, commit your changes or stash them before you can merge.
This error can be solved in a simple way:
$ Git stash save "updating to head from Repo"
Then you can continue to execute your pull command.