Ad space (banner)
🌿Git Lessons
Lesson 42 / 59

Applying a Stash Without Removing It with git stash apply

This lesson covers applying a shelved change while keeping it stashed, using git stash apply. It's for anyone searching "git stash apply usage."

git stash apply restores shelved changes back to your working directory. It's similar to git stash pop, but the difference is it leaves the entry in the stash list instead of removing it.

In Try It, run git stash apply. The most recently shelved change is restored to your working directory, while the same content also remains in the stash list.

A common early mistake is confusing pop and apply — pop deletes from the stash the moment it's applied, while apply keeps it, which makes apply the better choice when you want to apply the same change to multiple branches.

In real teams, apply gets chosen in scenarios where you want to reuse a stash — like applying the same fix to more than one branch.

Git
Try it (type this into the pseudo terminal)
git stash apply

🧑‍💻 You can type this command into the Git pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)