What is the difference between `git stash pop` and `git stash apply`?
IntermediateConceptCommits, branches and tags
Answer
pop applies the stash and drops it if it applies cleanly. apply leaves the stash in the list so you can apply it to more than one branch. If pop hits conflicts the stash is kept, which prevents loss.
git stash apply stash@{2}
git stash drop stash@{2}
git stash branch fix-login stash@{0}
More on Commits, branches and tags
How do you write a good commit message?BeginnerWhat is the difference between `git add .`, `git add -A` and `git add -u`?BeginnerHow do you commit only part of the changes in a file?BeginnerHow do you change the last commit message or add a forgotten file?BeginnerWhat is the difference between `git switch`, `git restore` and `git checkout`?BeginnerWhat is the difference between lightweight and annotated tags?Beginner