如何使用类似于 PhpStorm/WebStorm 的 GitKraken 查看特定文件的 git 历史记录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45244076/
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
How to view the git history of a specific file using GitKraken similar to PhpStorm/WebStorm
提问by Brian Schermerhorn
I DON'T care about looking at the git history of a file that has been marked as "modified".
我不在乎查看已标记为“已修改”的文件的 git 历史记录。
What I want is something akin to what WebStorm/PhpStorm have where you can select any file in your project (modified or NOT) and inspect it's git history and all the changes to that file.
我想要的是类似于 WebStorm/PhpStorm 的东西,您可以在其中选择项目中的任何文件(已修改或未修改)并检查它的 git 历史记录以及对该文件的所有更改。
I also DON'T want to have to look down the list of the git tree, and click on each one to see which files were commited.
我也不想查看 git 树的列表,然后单击每个列表以查看提交了哪些文件。
回答by Stephen Higley
You can use the fuzzy finder in GitKraken to accomplish this.
您可以使用 GitKraken 中的模糊查找器来完成此操作。
While in the repository
在存储库中时
- Press control/cmd + p
- Type history
- Enter in the filename you wish to view the history of
- 按控制/cmd + p
- 类型历史
- 输入您要查看历史记录的文件名
回答by Todd Menier
Here's another way if you prefer to keep your hand on the mouse. Select the most recent commit, and in the right pane check the "View all files" box. Now you have a tree view of the entire repository, not just the modified files. Browse to the file of interest, right-click and select "File History".
如果您更喜欢将手放在鼠标上,这是另一种方式。选择最近的提交,然后在右侧窗格中选中“查看所有文件”框。现在您拥有了整个存储库的树视图,而不仅仅是修改后的文件。浏览到感兴趣的文件,右键单击并选择“文件历史记录”。