skip to content
Alvin Lucillo

Safely unstash changes

/ 1 min read

First, choose a stash entry from the stack. The command shows items starting from the top of the stack, which starts at 0.

git stash list -n 3 | cat
stash@{0}: On feature/profile-avatar: WIP after adding image validation
stash@{1}: On fix/login-redirect: WIP before switching branches
stash@{2}: WIP on fix/login-redirect: a1b2c3d4e5 show an error when login fails

Select the stash item with the given index number. In the command below, it selects 0 or the top of the stack.

git stash apply stash@{0}