如何使用 Xcode 11 Git Blame/Authors 以前的修订版?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/56558631/
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-15 10:58:29  来源:igfitidea点击:

How to Git Blame/Authors a previous revision with Xcode 11?

xcodegit-blamexcode11

提问by C?ur

With Xcode 10.2, I could select the "Authors" view, then select a previousgit revision to blame from the bottom picker: picker is available

使用 Xcode 10.2,我可以选择“作者”视图,然后从底部选择器中选择要归咎于以前的git 修订版: 选择器可用

But with Xcode 11 beta, when I select the "Authors" view, I'm unable to select a pastrevision to blame because the picker is missing: picker is missing

但是对于 Xcode 11 测试版,当我选择“作者”视图时,我无法选择过去的修订版本,因为缺少选择器: 选择器丢失

Was that feature removed, or are there new steps to do to blamethe lines of code for a pastrevision? To illustrate it even more, I'd like to see in Xcode 11 a pastBlame like GitHub does when you blame a specific previousrevision.

是否删除了该功能,或者是否有新的步骤可以将过去的修订归咎于代码行?为了更多地说明它,我希望在 Xcode 11 中看到一个过去的责备,就像 GitHub 那样,当你责备特定的先前修订时

回答by u11636692

It has been moved here

它已移至此处

enter image description here

在此处输入图片说明

It has been moved here

它已移至此处

回答by Acton

click Editor->Author as it, sure it moved enter image description here

点击 Editor->Author as it,确定它移动了 在此处输入图片说明

回答by Ortwin Gentz

Select the enter image description hereicon in the window title bar to enter "Code Review" mode.

选择在此处输入图片说明窗口标题栏中的图标,进入“代码”模式。

git log (History) is available at Cmd-Alt-2. There you can open a specific commit in code review mode via the context menu.

git log (History) 在 Cmd-Alt-2 中可用。在那里,您可以通过上下文菜单以代码模式打开特定提交。

回答by claassenApps

Mine wasn't showing up until I went to Editor > Show Last Change For Line. After I selected that, the 'Authors' row appeared in Editor > Authors, as well as in the 'Adjust Editor Options' icon in the top right of the page.

直到我转到编辑器 > 显示行的最后更改后,我的才出现。在我选择之后,“作者”行出现在编辑器 > 作者中,以及页面右上角的“调整编辑器选项”图标中。

回答by bleater

In Xcode 11, the previous "Authors" menu item doesn't appear by default in the menu set. The simplest way to make it appear is to press the default key bind shift+control+command+A. After that, you'll find that "Minimap", "Authors", and "Code Coverage" now appear in the "Editors" menu.

在 Xcode 11 中,默认情况下,之前的“作者”菜单项不会出现在菜单集中。让它出现的最简单方法是按默认键 bind shift+ control+ command+ A。之后,您会发现“Minimap”、“Authors”和“Code Coverage”现在出现在“Editors”菜单中。

回答by vidle

If you go up to the top of Xcode, go to "View" and tap on "Show code review", you'll be able to get the git history with author information like on older versions of Xcode.

如果您上到 Xcode 的顶部,转到“查看”并点击“显示代码”,您将能够像在旧版本的 Xcode 上一样获取带有作者信息的 git 历史记录。