Git Stash Individual Files
Created on November 11, 2025
git
# either "push on the stack":
git stash push ./path/to/file1 ./path/to/fileN
# or:
git stash save -- ./path/to/file1 ./path/to/fileN
git stash list
# check what got stashed:
git stash show [-p / --patch] [stash@{1}]
# apply and remove from the stash stack:
git stash pop
# apply but keep in stash:
git stash apply
Useful options for push:
- use the option
-u / --include-untrackedto stash untracked files. - use the
-S / --stagedoption to stash staged files. - use
-p / --patchto choose hunks of a file to stash.