如何 运行 隐藏在 Github 桌面?

How to run stash in Github Desktop?

你如何 运行 存储在 Windows 的 GitHub 桌面?

该功能在 Sourcetree 中可用,但我无法在 GitHub Desktop 中找到它。

GitHub Windows 的桌面不支持存储。它具有的唯一类似于存储的功能是,如果您有未提交的更改,它将允许您切换分支。 Source

更新: GitHub Desktop V2.0.0 现在支持 stash (Issue 6107). 现在切换分支时,系统会提示您是否保留更改当前分支(隐藏)或将您的更改转移到另一个分支。

使用 Android Studio 的用户,在分支之间切换不需要 Github 桌面版,只需从 Android Studio 本身切换即可

select 您要切换到的分支> 变基到

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.

我意识到这个问题有点陈旧,Andrew 是正确的,但我想指出 GitHub Desktop 至少通过 Repository>Open in Command Prompt 提供了一个命令提示符的快捷方式然后,您可以通过传统的 git CLI 命令来执行 git stash。尽管如此,令人沮丧的是,GitHub Desktop 并未提供一种通过其 GUI 执行此操作的简洁方法,迫使您回退到 git CLI 工具进行存储。

更新!:Github 桌面显然已更新,现在可以通过切换到另一个未提交更改的分支来隐藏。系统会自动询问您是否要将更改保留在当前分支(隐藏)或将它们带到另一个分支:

然后当稍后返回分支时,您可以从存储中恢复,或丢弃它们:

现在,在 Github 桌面版 2.0 版本中,可以使用 Rebase 和 Stash 功能。可以找到更多信息 here