git blame:合并后的正确作者 [英] git blame: correct author after merge
问题描述
我可以理解这是冲突的变化(因为他解决了冲突)。但是有没有办法避免这种情况发生在非冲突的线上?一些选项git blame?
如果没有办法解决,那么当您进行大量合并时,这基本上会让git blame几乎无用 - 而GIT鼓励进行大量合并。
SVN是否存在非冲突合并的问题?我不这么认为,但我可能是错的,因为我(理解)在使用SVN时避免了像鼠疫一样的分支。
>内部 git blame
使用 git rev-list
来创建版本列表。和 git rev-list
接受 - 不合并
选项。
所以你可以这样做:
git blame --no-merges< file>
A GIT merge introduces a new commit. This causes problems with "git blame": the merged lines appear to be committed by the developer that did the merge.
I can understand this being the case for conflicting changes (because he solved the conflicts). But is there a way to not have this happening for non-conflicting lines? Some option to "git blame"?
If there is no way around, this would basically make "git blame" almost useless when you have a lot of merges - and GIT encourages a lot of merges.
Does SVN have this issue with non-conflicting merges? I don't think so, but I may be wrong as I (understandingly) avoided branches like plague when working with SVN.
Internally git blame
uses git rev-list
to create the revision list. And git rev-list
accepts the --no-merges
option.
So you can do:
git blame --no-merges <file>
这篇关于git blame:合并后的正确作者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!