Git stash commands

To push a named stash to the stack:

git stash push -m "The name of my stash"

To view the stash stack:

git stash list

To apply a stash and remove it from the stack:

git stash pop stash@{n}

To apply a stash and keep it on the stack:

git stash apply stash@{n}

To turn a stash into a branch:

git stash branch branchname stash@{n}
Back to top Back to Home