Interview Q&A / Git & GitHub

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What is the difference between git stash pop and git stash apply?

SHORT ANSWER

Both reapply stashed changes to your working tree. pop also deletes the stash entry afterwards, while apply keeps it, so you can reuse it on another branch.

Explain it simply

Apply is photocopying a note from a drawer; pop is taking the note out and leaving the drawer empty.

Use pop for the usual case: you stashed, switched, did something, and now want your work back. Use apply when you want the same changes on more than one branch, or want to keep a safety copy. If pop hits a conflict, Git keeps the stash anyway, so you do not lose it. Clean up later with git stash drop.

Example

bash
git stash list
# stash@{0}: WIP on main: 3a4b5c6 Add header
git stash apply stash@{0}   # keep the stash
git stash pop               # apply newest and delete it
git stash drop stash@{1}    # delete a specific stash

What to say in the interview

"pop applies the stash and removes it, apply applies it and keeps it. I use pop normally and apply when I need the same change on several branches. If pop conflicts, the stash is kept."

#git#stash#pop

Related questions

Practise more Git & GitHub questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Git & GitHub quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.