How to run stash in Github Desktop?
Asked Answered
L

4

45

How do you run stash in GitHub Desktop on Windows?

The feature is available in Sourcetree but I'm unable to find it in GitHub Desktop.

Lemmy answered 17/5, 2017 at 3:0 Comment(0)
M
51

GitHub Desktop for Windows doesn't support stash. The only stash-like feature it has is that it will allow you to switch branches if you have uncommited changes. Source

Update: GitHub Desktop V2.0.0 now supports stash (Issue 6107). Now when switching branches, you'll be prompted to either leave your changes on the current branch (stash) or bring your changes over to the other branch.

Mattias answered 17/5, 2017 at 3:24 Comment(0)
O
25

I realize this question is a bit old, and Andrew is correct, but I would like to point out that GitHub Desktop does at least provide a shortcut to a command prompt via Repository>Open in Command Prompt which you can then use to execute git stash through the traditional git CLI commands. Still, frustrating that GitHub Desktop doesn't provide a clean way to do this via their GUI, forcing you to fallback to git CLI tools for stashing.

UPDATE!: Github Desktop apparently updated and can now stash by switching to another branch with uncommitted changes. You will automatically be asked if you want to leave your changes on the current branch(stash) or bring them to the other branch: enter image description here

Then when going back to the branch later, the you can restore from the stash, or discard them: enter image description here

Operable answered 27/9, 2018 at 20:35 Comment(1)
The reason we are using sourcetree.Lemmy
U
7

Now, with the Github Desktop 2.0 version, Rebase, and Stash features are available. More info can be found here

Unprecedented answered 7/6, 2019 at 6:21 Comment(0)
C
3

For those who are using Android Studio, no need for Github Desktop version in switching between branches, just switch from the Android Studio itself

enter image description here

select the branch you want to switch to > Rebase onto

PS: The Android Studio notify you with Rebase failed error (if you have created files in the branch you are on) and you will have to remove them by clicking on View themRetry then select them all and delete with the red - sign button, then do a Rebase onto again.

Chin answered 29/5, 2018 at 6:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.