Forrest logo
back to the tig tool

tig:tldr:d4907

tig: Start in stash view, displaying all saved stashes.
$ tig stash
try on your machine

The tig stash command is used in the Git client tool called "tig" to manage stashes. A stash is a way to save changes that you have made in your working directory but do not want to commit yet. It allows you to temporarily set aside your changes and go back to a clean working directory without committing them.

When you run tig stash, it creates a new stash. It takes a snapshot of your current state, including any modifications you have made to tracked files that have not been committed yet. Git saves this stash as a separate branch, allowing you to switch back and forth between the stash and your working directory.

The tig stash command has several subcommands that can be used to control and manipulate stashes. For example, you can use tig stash apply to apply the most recent stash to your working directory, tig stash list to display a list of all your stashes, and tig stash pop to apply the most recent stash and then delete it from the stash list.

Overall, the tig stash command is a useful tool in Git for managing temporary changes and quickly switching between different states of your working directory.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the tig tool