git stash
Category: git
Date: Jan. 28, 2025, 11:29 p.m. PST
Tags: stash
Stash local changes
git stash
Stash only unstaged files
git stash save --keep-index
Stash local changes with a custom message
git stash save "this is your custom message"
Re-apply the changes you saved in your latest stash
git stash apply
Re-apply the changes you saved in a given stash number
git stash apply stash@{stash_number}
Drops any stash by its number
git stash drop stash@{0}
Apply stash and immediately drop it from your stack
git stash pop
Release a particular stash from your list of stashes
git stash pop stash@{stash_number}
List all stashes
git stash list
Show the latest stash changes
git stash show
See diff details of a given stash number
git diff stash@{0}