SourceTree 中的 git-blame 在哪里
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10581843/
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
Where is git-blame in SourceTree
提问by artistoex
I'd like to see who contributed which line/change to a file. git-blame does exactly that. So does SourceTree have a git-blame view?
我想看看谁为文件贡献了哪一行/更改。git-blame 正是这样做的。那么 SourceTree 有 git-blame 视图吗?
回答by GoZoner
Select a file, whether in the 'working copy' display or in the 'commit' display, and do one of three things:
选择一个文件,无论是在“工作副本”显示中还是在“提交”显示中,然后执行以下三件事之一:
- option-command-B
- menu bar :: Actions :: Blame Selected...
- contextual menu :: Blame Selected...
- 选项命令-B
- 菜单栏 :: 操作 :: 责备所选...
- 上下文菜单 :: 责备选定...
If the file you want to blame is not in the modified files list, you need to change the view to File Status View (View --> File Status View), then set the Sub menu to "Show All"
如果要归咎的文件不在已修改文件列表中,则需要将视图更改为文件状态视图(View --> File Status View),然后将子菜单设置为“全部显示”
回答by Rohan Singh
- Switch to the history view and select a commit that has the file you would like to blame.
- Right-click the file name and select Blame Selected.
- 切换到历史视图并选择一个包含您要责备的文件的提交。
- 右键单击文件名并选择Blame Selected。
Alternatively, you can right-click a file in the working tree or that has been staged and do the same thing.
或者,您可以右键单击工作树中的文件或已暂存的文件并执行相同的操作。
回答by Amita
Right click the file-> Blame selected. You can find writer of Each line . Trick: Make a minor change like adding a space in the file you want to find the file easily(File Status) in Source tree.
右键单击文件-> 已选择的责备。你可以找到每行的作者。技巧:做一个小改动,比如在文件中添加一个空格,你想在源树中轻松找到文件(文件状态)。