如何在不使用 Github Desktop 推送本地更改的情况下从远程存储库中提取更改

How to pull changes from the remote repository without pushing the local changes with Github Desktop

大家好,

我正在尝试使用 Github Desktop,但我在他们的网站上找不到如何在不推送所有本地更改的情况下从远程存储库中提取更改。在 github 网站上,写着:

Pull changes — Click the “Sync” button in the upper-right corner of GitHub Desktop to bring code from an online repository (for example, changes that your co-worker pushed up) onto your computer. Note: This will also push changes you haven’t pushed yet.

在Github桌面上还有一个"Pull Requests"按钮,但显然它合并了远程分支,这绝对不是我想要实现的。

提前致谢:)。

这是 Github Desktop macOS 版本的解决方案。

我还没有充分探索 Github 桌面..

我们可以通过从顶部栏菜单中选择来实现从远程存储库中拉取更改而不从本地存储库中推送更改:

存储库 -> 拉取

或者直接输入快捷方式:

Shift + Cmd + P