问题描述
我在Mac OS X 10.10上将GitHub用于Mac版本210.点击同步"按钮删除了我未提交的更改.是否应该不时发生这种情况?到目前为止,我从来没有遇到过这个问题,尽管我主要在Windows上使用Github.
I use GitHub for Mac version 210 on Mac OS X 10.10. Hitting the "sync" button deleted my uncommitted changes. Is that supposed to happen from time to time? I've never had this issue till then, though I've mostly used Github for Windows.
我认为,如果我有一些未提交的更改与GitHub存储库中的任何内容发生冲突,则单击同步"按钮将失败并产生以下错误消息:
I thought that if I had some uncommitted changes that conflict with whatever there is in the GitHub repository, hitting the "sync" button would fail and yield the following error message:
推荐答案
Github Desktop 创建包含您所做更改的存储区.
The Github Desktop creates an stash with your changes.
您可以使用以下方式列出存储空间:
You can list the stashes with:
git stash list
并应用 Github Desktop 通过以下操作创建的版本:
And apply the one that Github Desktop created by doing:
git stash apply stash@{0}
有关git stash
的更多信息,请参见此.
For more information about git stash
see this.
这篇关于适用于Mac的GitHub同步删除了我未提交的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!