Git Stash
Created on April 16, 2026
commandline, git
I barely used working with git stash. Here are commands I find interesting and would like to use more.
Here is the definition of “to stash” from the Oxford Learner’s Dictionaries:
stash something + adv./prep. to store something in a safe or secret place source
# show the help message
git stash --help
# stash all changes
git stash
# this will only add tracked files to the stash and ignore
# untracked files (not yet known to git, new files).
# to also add untracked files, use the
# -u / --include-untracked option
git stash -u
# apply all stashed changes and remove stash entry
git stash pop
# stash changes with a message
git stash push -m "describe what I tried"
# stash only a file or directory
git stash push README.md -m "experiment with stashing"
# list all stash entries
git stash list
# apply a specific entry (without removal)
git stash apply stash@{0}
# apply entry and remove from stash
git stash pop stash@{0}