The specific method is as follows
Git pull Origin branch // error occurred git stash // Restore git stash Clear
Developers often encounter this situation: It took a few days to do a new function, has changed almost more than 10 files, suddenly a bug needs to be resolved urgently, and then to a build test group. It's often time-consuming and error-prone to rely on manual backups before git comes out.
The git stash command in a nutshell is to help developers temporarily shelve changes that have been made, back to their pre-change state, perform other necessary actions (such as publishing, or fix a bug, or branch, and so on), and then reload the previously shelved changes. Pretty cool, huh?
First, use git add to add all the changes to staging area.
git Add.
Then use git stash to put these changes on hold.
Git stash
Here, the current work platform is back to the change. What to do, omit 10,000 words here.
Need to retrieve previous pending changes to continue with previous work?
Git stash apply .
You can also use git stash list to see all of the shelved versions (may have been shelved many times, it is better not to do so, easy to confuse)
In the case of a shelving stack, such as if you want to retrieve the 2nd in the stack, you can use git stash apply [email protected]{1}
If you want to retrieve the 1th one, you can use git stash pop
If you want to delete a stash,git stash drop <id>
Delete all stash,git stash clear
Turn:
http://my.oschina.net/u/554046/blog/308614
http://www.01happy.com/git-resolve-conflicts/
What about conflicts with local files when using git pull files?