git learning (nine) - idea git stash operation

  In said earlier, git stash command role is to present submissions but do not want to have the modifications are saved to the stack, the follow-up to restore the contents of the stack on a branch; range git stash action include workspace and the contents of the staging area, did not submit content will be saved to the stack; for example, the sudden emergence of online bug, we need to switch to the master branch, but did not submit the current branch code switch directly branch, will be the current branch the new codes will be added to the master branch, and the code can not at this time commit, so this time we can use git stash;

  • git stash scratch codes

        

 

  Use git stash the temporary code will change the staging area and workspace saved;

        

 

  Add notes information, select  the CREATE STASH . Current code work area is restored as it was before became unmodified;

 

  • Code scratch reduction

        

 

        

 

    Before selecting saved, while checking stash Pop (after restoration is complete, it will automatically delete the stash, do not check it does not remove this stash, select a specific look at the situation) , click on Pop Stash button, written before the area code will work recovery back;

 

 

 

  

Guess you like

Origin www.cnblogs.com/coder-zyc/p/11566923.html