Re: Git is not recognizing some merge conflicts and just accepting incoming master version
- From
Thomas Guyot <tguyot@gmail.com>
- Date
- Mar 23, 2024, 19:17 UTC
- Message-ID
- <d8fa6ab2-949b-4d6f-9c8f-e80f2e524fb7@gmail.com>
- In-Reply-To
- <CA+XMOBuYVWwEE-p=3GHBUcnnM_jn0pneW1rbcQU124DjnJYycA@mail.gmail.com>
On 2024-03-16 05:19, Kai wrote:
Show 12 quoted lines
> Thanks a lot for the explanations Brian and Hannes. That clarifies it > a lot. I had not come across such a semantic issue in my limited > experience with git before, so I was a bit thrown off. > > Given this behavior, I still think it would be a great feature for the > person doing the merge to at least optionally be able to see > highlighted parts of the code that had any changes between the base > and the other two branches. Since these parts of the code could > potentially cause problems much more than lines of code that have not > been touched by any branch. But I guess that would be more a GUI > feature than related to git directly, correct? Maybe there is already > a GUI offering that?
The --diff-merges=combined option (or simply "-c") of git show is probably what you're looking for.
There is also a dense-combined (or "--cc") option that skips seemingly unrelated hunks, which doesn't mean these hunk aren't problematic, just that there's 6+ lines appart.
Regards,
-- Thomas