Let’s talk about how to save your changes for later with stashing.
Stashing files
Stash your changes by hitting the Stash icon in the top toolbar.
Your stash will appear on the graph. If you right click on the stash, you will be given the option to:
- Apply Stash: Applies the changes to your WIP and retains stash for reusability
- Pop Stash: Applies the changes to your WIP and then deletes your stash
- Delete Stash: Annihilates a stash
- Hide: Hides the selected stash from the commit graph
- Hide all stashes: Hides all stashes from the commit graph
- Show all stashes: Shows all stashes on the commit graph
If you only need to pop your stash, then use the Pop Stash button in the upper toolbar:
Stashing from commit panel
Stage your file and click on the Stash icon to enable the option.
Stashing from the left panel
Your stashes will be available from the left panel for review. The same options to Apply, Pop, Delete, Hide, Hide all, or Show all are present too:
This is helpful for those times you cannot find your stash on the graph.
Naming a stash
To name your stash, type the desired name in the // WIP
field at the top of the graph.
The stash will now appear in the left panel and the graph with the desired name.
Partial stash
Sometimes you only need to stash some of the files in your WIP.
Partial stashing is found in the “staged files” panel. Right-click individual files, or multiple files, and select the “Stash file” option to stash those selected files and have their changes reset.
Apply changes from stash to working directory
You can also partially apply a stash. When a stash is selected, right click files in the right panel to apply their changes to the working directory.
Partial stash tips
- You may name a partial stash by typing into the //WIP node or summary section before creating the stash.
- Select additional files for stashing or applying by holding down the Shift or Control key.
- Applying a file from a stash does not remove the file from the stash – use this to safely explore!