Friday 16 October 2015

Git stash apply vs pop

Stashing takes the dirty state of your working directory - that is the modified tracked files and staged changes - and saves it on a stack of unfinished changes that you can reapply at a time.

Git stash pop removes the stashed change on top and "applies" it to your repo. Git stash apply on the other hand, just applies those changes to your repo, and leaves it on stack to be reused laster, if you want.

Git stash pop is actually git stash apply  followed by git stash drop.


No comments:

Post a Comment