git 使用 GitHub Desktop 一次性放弃所有更改

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32088751/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 11:17:10  来源:igfitidea点击:

Discard all changes at once using GitHub Desktop

gitgithubgithub-desktop

提问by Franck Dernoncourt

How can I discard all changes at once in GitHub Desktop? (I use it on Windows)

如何一次性放弃 GitHub Desktop 中的所有更改?(我在 Windows 上使用它)

I used to do:

我曾经做过:

enter image description here

enter image description here

but can't see the option any more since GitHub for Windows upgraded itself silently (and changed its name to GitHub Desktop on the way).

但由于 GitHub for Windows 以静默方式自行升级(并在途中将其名称更改为 GitHub Desktop),因此无法再看到该选项。

I don't want to do it manually for each file one by one. I know I can use the git shell.

我不想一个一个地为每个文件手动进行。我知道我可以使用 git shell。

I use the latest version of GitHub Desktop, viz. 3.0.1.1.

我使用最新版本的 GitHub Desktop,即。3.0.1.1。

回答by Franck Dernoncourt

I found it... now we need to right-click precisely on the "X changes" text in blue:

我找到了……现在我们需要精确地右键单击蓝色的“X 更改”文本:

enter image description here

enter image description here

Thanks for the hide-and-seek.

谢谢你的捉迷藏。



On GitHub Desktop for Mac v2.17: Menu Bar > Repository > Discard Changes to Selected Files.

GitHub上的Mac版桌面v2.17: Menu Bar > Repository > Discard Changes to Selected Files

enter image description here

enter image description here



Related issues:

相关问题:

回答by PatrickT

This ought to be just a comment, but I thought a screenshot of current looks might be useful. So to add to Franck's excellent answer:

这应该只是一个评论,但我认为当前外观的屏幕截图可能会有用。所以要补充弗兰克的优秀答案:

enter image description here

enter image description here