查看文件夹的 git 历史记录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11950037/
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
View git history for folder
提问by Thomas Vervik
How can I view git log history for all files within a folder ?
如何查看文件夹中所有文件的 git 日志历史记录?
I have found several posts on how to show log for a specific file, but haven't found for a specific folder.
我找到了几篇关于如何显示特定文件的日志的帖子,但没有找到特定文件夹。
回答by knittl
You can use either foldername
or foldername/*
. Either way should work.
您可以使用foldername
或foldername/*
。无论哪种方式都应该有效。
git log -- path/to/folder
git log -- path/to/folder/*
History of renamed files will not be followed with this method.
此方法不会跟踪重命名文件的历史记录。
回答by OSdave
if you want to use a graphic tool, such as gitk, it works the same:
如果你想使用图形工具,比如 gitk,它的工作原理是一样的:
gitk -- path/to/folder