TortoiseGit Manual

Stash Changes

When you want to record the current state of the working directory and the index, but want to go back to a clean working directory, right click on a folder to pop up the context menu and then select the command TortoiseGitStash Save A dialog will pop up where you can optionally enter a message for this state:

Figure 2.37. Stash save dialog

Stash save dialog


You can also select include untracked, to stash untracked files away, too. To stash all files away, including ignored files in addition to the untracked files, select --all.

When TortoiseGit detects that a stashed changes exist, the context menu will be extended:

Figure 2.38. (un)stash options

(un)stash options


The stash is implemented as a stack. Stash Apply will apply the changes of the latest stash to your working tree. Stash Pop does the same, but will remove the latest stash from the stack after applying it. Stash Save is still possible and will stash the current changes of the working copy to the top of the stack. Stash List provides an overview of all the whole stash stack. You can also remove and view the stashed changes there (similarly to the the section called “Revision Log Dialog” and the section called “Reference Log”).

You can find more information at the section called “git-stash(1)”