Last active
February 20, 2024 21:02
-
-
Save amiryal/1159852 to your computer and use it in GitHub Desktop.
Easily visualise Git merge.conflictstyle diff3 with meld, while preserving all information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[merge] | |
conflictstyle = diff3 | |
tool = three_meld | |
[mergetool "three_meld"] | |
# Opens up four diff windows: | |
# LOCAL:MERGED, BASE:LOCAL, BASE:REMOTE, LOCAL:REMOTE | |
# | |
# Lets you edit the MERGED file (including original diff3 markers), showing | |
# you the final diff from LOCAL. For reference, you can look in the other | |
# windows to see how LOCAL and REMOTE are each different from BASE, as well | |
# as the dumb diff between LOCAL and REMOTE. | |
cmd = "env LOCAL=\"$LOCAL\" REMOTE=\"$REMOTE\" BASE=\"$BASE\" MERGED=\"$MERGED\" bash -c 'meld --diff \"$LOCAL\" \"$MERGED\" \"$REMOTE\" --diff \"$BASE\" \"$LOCAL\" --diff \"$BASE\" \"$REMOTE\"'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment