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

Interesting hack: Office 2016 in night mode

If youre like me, you feel dark themes are important Call me VT700 old school but the light on dark UI is superior to the default paper-white interfaces that come default with most programs. If youre staring at a screen for a full time... Continue →