git log --follow,显示所有提交,包括合并 [英] git log --follow, show all commits including merges
问题描述
我想git log --follow file.ext
,但显示所有提交,包括合并.
I would like to git log --follow file.ext
but showing all commits, including merges.
尝试了no-max-parents
,但没有帮助.
推荐答案
-m
将为您解决问题,log -m
用于进行合并.
The
-m
will do the trick for you,log -m
is for get into the merges.
git log -m --oneline --full-history --follow file.ext
这应该在合并[-m
]中的文件之后.
This should follow the file in the Merges [-m
].
我假设您的目标是使用--min-parents=2
而不是no-max-parents
. --min-parents=2
与--merged
相同,因为它会返回一个多于一个父级的提交.
And i assume you was aiming to use --min-parents=2
instead of no-max-parents
. The --min-parents=2
is the same as --merged
since it will return the commit with more then one parent.
您总是可以添加一些额外的标志以更友好的方式显示结果:
git log -m --name-only --oneline --follow file.ext
.它将使用提交的SHA-1和消息显示结果
You can always add some extra flags to display the results in a more friendly way:
git log -m --name-only --oneline --follow file.ext
. It will display the results with the SHA-1 of the commits as well with the message
这篇关于git log --follow,显示所有提交,包括合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!