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 changes A dialog will pop up where you can optionally enter a message for this state:

Figure 2.48. Stash changes dialog

Stash changes 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.49. (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 changes 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 “Log Dialog” and the section called “Reference Log”).


Although major merge work is done by git automatically applying a stash, a conflict may happen during cherry-picking (i.e., a file was modified in your current branch and also in the stash), please see the section called “Resolving Conflicts” on how to resolve conflicts.

Please note, that "REMOTE"/"theirs" in the conflict editor refers to the to be merged stash and "LOCAL"/"mine" to your version in the working tree before you applied the stash.

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