DELAPARRA
Index
Color
NL
Category: Git commands

git stash

Explained by Updated

What is git stash?

git stash: Temporarily shelve uncommitted changes so you can switch context. git stash puts your uncommitted changes aside and gives you a clean working folder. git stash pop brings them back later. It is handy when you need to switch tasks quickly. You are halfway through a feature, an urgent bug comes in, and you do not want to commit unfinished work. Stash, switch branches, fix the bug, switch back and pop.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about git stash

What should you keep in mind with git stash?

Stashes are easy to forget. git stash list shows what is stored, and old stashes pile up quietly. Give them a description with git stash push -m "half-done export" so you know what they are later. Untracked new files are not stashed by default; add -u to include them. For work that will take longer, a work-in-progress commit on a branch is often safer than a stash.

At a glance

CategoryGit commands
Explained by
Updated

More Git commands terms

All terms starting with G

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.