Large git branch merges using beyondcompare

when I have two very active git branches that are out of date and i type:

git merge theotherbranch

I prepare myself for a bad day at the office because git merge strategies are pretty naive and if any file was touched in both branches it will automatically deemed a conflict requiring manual review. Playing it safe is fine except when youre deailing with hundreds of files 95% of which have no significant conflict.

BeyondCompare has a command line tool with an “automerge” option which, true to its name, will automatically merge non-conflicting files which is a HUGE time-saver in large merges. The catch is if you follow beyondcompare’s documentation you wont get the automerge functionality.

Which brings me to the .gitconfig settings below :)

[diff]
        tool = bc3
[difftool]
        prompt = false
[difftool "bc3"]
        path = /c/Program Files (x86)/Beyond Compare 3/BComp.exe
[merge]
        tool = bc3
[mergetool]
        prompt = false
        keepBackup = false
[mergetool "bc3"]
        cmd = /c/Program Files (x86)/Beyond Compare 3/BComp.exe -automerge -ignoreunimportant -reviewconflicts "$LOCAL" "$REMOTE" "$BASE" "$MERGED" 
        trustExitCode = true
 
10
Kudos
 
10
Kudos

Now read this

How to keep hungry tigers busy in the early morning

Preface: feeding your pets is an important bonding ritual. You should avoid employing machines as a full substitute for feeding. But my tigers and I have reached a stalemate RE: Breakfast time Tigers sleep all day long. Of course they... Continue →