[英]Git : show history of a single file, including merge commits
TL;DR : is there a way to list all commits that modified a single file, including merge commits ? TL; DR:有没有办法列出所有修改单个文件的提交,包括合并提交? Knowing that
git log -p --cc {filename}
as suggested here does not do the trick. 知道这里建议的
git log -p --cc {filename}
并不能解决问题。
In the following scenario : 在以下情况下:
I understand this scenario is bad news (there should have been automated tests to realize branch2 was broken, and M3 should have never happen in the first place, etc... Back to the sad reality of people being people and screwing up sometimes.) 我知道这种情况是个坏消息(应该有自动化测试才能发现branch2坏了,而M3从来就不会发生,等等……回到人们成为人们的悲伤现实,有时会搞砸了。)
We had a hard time realizing this, because, althought we knew exactly what file caused the error, we did not find a way to list all the commits. 我们很难实现这一点,因为尽管我们确切地知道是什么文件导致了错误,但是我们没有找到列出所有提交的方法。
Following this SO question, we tried : 按照这个SO问题,我们尝试了:
git log -p --cc {filename}
This only prints commits up to C1. 这只会打印提交到C1的提交。
What are we missing ? 我们缺少什么? Thanks.
谢谢。
我会尝试这样的:
git log -m --no-max-parents -p {filename}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.