Skip to content
GitTree
Stashes and worktrees

Stash changes

A stash puts your uncommitted changes aside and gives you a clean working folder, like git stash, so you can switch tasks and bring the changes back later. Stash in the toolbar saves everything; the changes panel’s Stash tab chooses exactly what.

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. Bring a stash back
  6. If something goes wrong
  7. Questions
  8. Related

Before you start

  • You have uncommitted changes in the repository.

Where to find it

  • Stash and Pop in the toolbar.
  • The Stash tab beside Commit at the bottom of the changes panel, for options.
  • The Stashes section of the left panel lists your stashes; right-click one for its actions.
ActionmacOSWindows and Linux
Stash All Changes⌘⇧SCtrl+Shift+S
Pop Latest Stash⌘⇧OCtrl+Shift+O

Steps

  1. Open the Stash tab

    Open your changes from the // WIP row and select the Stash tab under the file lists.

    The Stash tab of the GitTree changes panel with the message field and the Stash button numbered
    1 the Stash tab, 2 an optional message, 3 the button that stashes.GitTree interface with a demonstration repository.
  2. Choose what goes in

    Under Changes to stash, pick All changes, Only staged changes or Only the selected files. Turn on Include untracked files for new files too.

  3. Name it and stash

    Type a Message so you recognise it later (otherwise Git names it after the branch), and press Stash.

Expected result

GitTree says Stashed your changes. The working folder is clean, and the stash appears in the Stashes section.

Bring a stash back

The actions on a stash
ActionWhat it does
Pop StashApplies the changes and removes the stash.
Apply StashApplies the changes and keeps the stash in the list.
Show StashShows its files and diff without applying anything.
Create Branch from Stash…Creates a branch at the commit the stash was made on, checks it out and applies the stash there.
Rename Stash…Changes its message.
Delete Stash…Removes it from the list; it is kept in the recovery snapshots, so Undo brings it back.

If something goes wrong

“The stash conflicts with your changes: resolve the conflicts. The stash is kept.”

Your current files changed the same lines. Resolve the conflicts; the stash stays in the list until you delete it.

“Nothing to stash: there are no changes.”

The working folder is already clean. New files are only stashed with Include untracked files.

Questions

Stash or worktree?

A stash suits a short interruption. To keep working on two branches at once, a worktree gives each its own folder.