git stash command role is to present submissions but do not want to have to modify the contents saved to the stack, the follow-up to restore the contents of the stack on a branch. Range git stash action include the contents of the work area and the staging area, did not submit content will be saved to the stack.
- git stash save
With information notes git stash, remarks information will be stored;
git stash save “Your stash message”
- git stash list
View memory list
git stash list
-
git stash apply
The work top stack stash to the local repository may be a stash stash ID by applying local repository, the present embodiment is stash @ {1};
git stash apply stash@{1}
- git stash pop
This command and stash apply very similar, but it will remove the stash in the application to a local warehouse after; can also pop a stash by a specific stash id;
git stash pop stash@{1}
- git stash show
Display stash difference; this command only consider the most recent stash and compare;
Complete difference, can be used
git stash show -p
To see the difference through a stash stash id
git stash show stash@{1}
- git statsh branch [name]
Create a new branch according to the most recent stash, and then delete the most recent stash (and stash pop the same);
If you need a stash, you can specify stash id;
git stash branch <name> stash@{1}
- git stash clear
All stash delete warehouse created
- git stash drop
Delete recent work stack stash
You can specify stash id;
git stash drop stash@{1}
As the operational errors, resulting in remote code is covered, then you can use git stash to solve; former local modifications should be avoided as much as possible there are too many differences between the local and remote repository, perform a remote update git pull first before pulling local modifications local; before submission to the first stack into local modification, then update the code from the server, to avoid excessive Merge codes;
stash git git pull git POP if conflict resolution conflict