I'm trying to figure out whether a merge conflict was responsible for a bug, but I'm having difficulty because I'm not clear on how conflict resolution affects git blame
.
Let's say I have a file in master:
a();
b();
c();
I modify it in master:
a();
d();
c();
but so does a co-worker, and they modify it differently, in a separate branch which they then merge in to master:
a();
e();
c();
Can resolving that conflict affect the blame? In other words, if my co-worker resolves the conflict by going with my version:
a();
d();
c();
and I git blame
the d();
line, who will be blamed: me or my co-worker?
Similarly, let's say git got confused and thought both the first and second lines were conflicted:
<<<<
a();
d();
====
a();
e();
>>>>
If my co-worker resolves the conflict with their version:
a();
e();
c();
and I git blame
the a();
line, will I (the line's original author) get the blame, or will my co-worker (who "touched" it last, even though they didn't change it) get the blame?