Using stash in SourceTree
Asked by Patrick O'Hara:

Hello,

I have been using SourceTree for a while at home. I really like it. It has made git considerably more intuitive for me to use. I have recently started using it at work (We use Windows at work). I just ran into an issue with the stash. I was able to stash some changes easily enough (its on the tool bar). I then pulled (actually fetch and rebase using the pull dialog). Then I when to pop my changes off the stash and found that there is no obvious way to do that. I assume that I am missing a context menu or some such. Please point me in the right direction, thanks.

Pat O


Answers:
author: Ryan Beesley
body: The Stashes are visible on the "left sidebar," situated between the Bookmarks and the File Status, Log / History, and Search views. There is a context menu for each Stash that will let you Apply or Delete a saved stash.

This really needs improvement.

I had managed to resize my "left sidebar" so that it was completely hidden (well, not obvious that it was there at any rate). The only thing that looked like a "left sidebar" to me was the Bookmarks sidebar. As a result I spent a half hour trying to make sense of the few support answers I could find.

Two things would make this better. 1) Make the resize of the left sidebar more clear. Somehow make it obvious that there is content hidden when the sidebar is collapsed and make it easy to reset it back to appropriate dimensions. 2) Provide a GUI wizard to make unstashing as easy as stashing and put the action alongside the Stash icon in the toolbar. Additionally, provide a command in the Repository menu that is clearly the command partner of Stash.

comments: author: KieranA
body: Hi Ryan,

I've filed this for you on JAC here: <https://jira.atlassian.com/browse/SRCTREE-1871>

Thanks for the feedback


author: Jeroen Pluimers
body: Can you file this for SRCTREEWIN as well? Or can I file it while referring to 1871 and this thread?


author: Christopher Corbell
body: I just had the exact same issue as Ryan. I dropped a lot of f-bombs trying to figure out where my stashes went before I realized there was a whole area hidden between these pains. Would a menu item under "Actions" called "Apply Stashes" be a stretch? TIA.


author: Michael Kellogg
body: I switched into my branch and expected to see the "Stash" icon button on the toolbar at the top light up and show a "1" the way the others do when they're active. I didn't see that, went into Git Bash and did a git stash list, saw my stash was safe and sound, then found this post and immediately found the Stashes sidebar button. Thanks for the heads-up!


author: Tom Bates
body: BTW, if you don't see a Stashes entry on that secondary sidebar (it is under File Status, Branches, Tags, and Remotes on my screen), you might be (like I was) looking at a working directory (a bookmark?) that doesn't have any stashes. Check the tabs across the top to be sure you have the right thing selected.


author: Vukasin Nikodijevic
body: At least "unstash" menu option to point you whenever.  
It is kinda logical to have it below "stash" option.


author: Tom Richards
body: I went searching for a "pop" or "unstash" operation in menus as well -- not because the LH pane was minimized, but because I have a VERY long list of remote branches and I didn't think to scroll down it looking for Stashes.

I like Vukasin's suggestion of adding it to menu right under "stash"..


author: orionnoir
body: This is an issue for Shelve too. It is SUPER unclear. Thanks for posting this. I resized the left column and there was the show button. Days of work, just missing (appearance anyway.) The UI really needs to expand (SHOW) when you click on the label... Show is hidden on every install I have done. Everyone one of them... (about 4 different machines) I am looking for this now, but talk about freaking a dev out...


author: Chris Catto
body: To Stash changes in SourceTree we can go to the "Repository" menu ( right of File \& Edit) then "Stash Changes".

Also in Terminal the command is simply "git stash"

comments: author: Stef Joosten
body: I think the problem here is that stashes may get hidden by moving around the panes in the screen. I had that. I remember moving screens a long time ago. After several months I forgot about it. I stashed my changes and could not find my stash. If moving panes causes this problem (and other problems like it), the solution should be to make it more obvious that there are hidden panes. This problem still persists in version 1.9.10.0, which is currently the latest version.


author: Stephen Paulsen
body: Version 3.2.1 (on Mac) 2019-11-8 and there is ++***STILL***++ no obvious way to pop/apply a stash. It's not in the Repository menu like "Stash Changes..." is, and it's not in the Actions menu where I might expect it --- it is *only* in the context menu for a listed stash.

It's also still possible to "lose" the sidebar where the stashes are listed.

Besides that, I'm afraid to click "Apply Stash" because it doesn't have the ellipses like "Apply Stash..." implying that it will happen *immediately* --- what exactly will happen when I click that choice?  
If I search SourceTree help for "stash" the only thing that comes up is "Stash Changes..." --- searching for "apply" only lists "Apply Patch..." no "Apply Stash"

I also want to do an interactive apply stash (with a GUI!), like might be done with

    git checkout -p stash@{0}

but there doesn't seem to be any way to do that.

\</gripe\>


author: Elena_Santasheva
body: Stash on Sourcetree does not work :((((((


author: Ian Jeffray
body: On the left sidebar, hover over "Stashes" and you'll get a "SHOW" button. Hit it. Then you'll see your stashes, and can apply or delete them from there.