git -> 显示特定目录中最近提交更改的文件列表

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

git -> show list of files changed in recent commits in a specific directory

git

提问by sumek

How can I do:

我能怎么做:

svn log -v -l 10 ./

in git?

在 git 中?

回答by htanata

This one is more similar to the svn command as it shows the file status: Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), and others.

此命令更类似于 svn 命令,因为它显示文件状态:已添加 (A)、已复制 (C)、已删除 (D)、已修改 (M)、已重命名 (R) 等。

git log --name-status -10 path/to/dir

It is worth looking at the full documentation page for git log. There you will learn that -10refers to the past 10 commits, and -pwill give you the full patch, among a variety of other goodies.

值得查看完整的文档页面git log。在那里,您将了解到-10过去 10 次提交的内容,-p并将为您提供完整的补丁以及其他各种好东西。

回答by dbn

To show all files changed in the last 10 commits, without any commit information, do:

要显示在最近 10 次提交中更改的所有文件,没有任何提交信息,请执行以下操作:

git diff --name-only HEAD~10..HEAD yourdir

回答by blue112

Try to do

试着做

git log -p -10 yourdir/

It should work.

它应该工作。

回答by Sayan Biswas

To show all the commitof your branch(recent and old), you need to count the number of commits in the branch

要显示所有commit分支(最近的和旧的),您需要计算分支中的提交次数

git rev-list --count branch_name

Once you get all the commit count, you can run

获得所有提交计数后,您可以运行

git log --name-status -countNumber /path