0

I already saw this thread and a few others, but couldn't find any satisfactory answer. My question is, when I try to git merge, and get a CONFLICT, is there an out-of-the-box way for me to find out which pair of commits caused the conflict? I'm not looking for another way to merge (rebase, imerge, etc.), it's just a skill I want to have to find the commits that caused the conflict when I only have git in hand.

YoavKlein
  • 2,005
  • 9
  • 38
  • 1
    Git doesn't keep track of conflicts once merged. – evolutionxbox Jul 19 '21 at 11:39
  • 2
    There's no builtin commands for figuring out which commits that causes the merge conflict, no. You could look into trying to automate it by iteratively merging one commit at a time, but that's probably not a good idea either because following commits might fix the problem before the merge. A different approach would be to figure out which lines are causing the conflict, and then use git blame to figure out where they came from. – Lasse V. Karlsen Jul 19 '21 at 11:42

0 Answers0