Search code examples
gitgit-mergegit-merge-conflict

How can I determine what commits cause a conflict?


I'm doing git merge develop feature/ticket-123, and I'm getting merge conflicts. The conflicts are complex enough that I want to see the context of the changes being made, so that I can resolve them properly.

I can see which files have merge conflicts, but those files only say what is from develop and what is from feature/ticket-123. How can I see the specific commits that cause the conflict, so I can resolve the conflict better?

I had a look at How to resolve merge conflicts in Git? , but I couldn't see anything that had this information


Solution

  • Until somebody comes up with a better answer, here's a workaround: Do a git rebase develop on the feature branch instead of merging, to apply the commits one by one and solve conflicts immediately.