Skip to content

Instantly share code, notes, and snippets.

@akovac35
Created November 26, 2019 11:41
Show Gist options
  • Save akovac35/cf3ffff9e6523040ea5bfb93abca5462 to your computer and use it in GitHub Desktop.
Save akovac35/cf3ffff9e6523040ea5bfb93abca5462 to your computer and use it in GitHub Desktop.
An example of .gitconfig for Notepad++ 7.5.9+ and WinMerge 2.16.4+.
[core]
editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[merge]
tool = winmerge
[mergetool "winmerge"]
name = WinMerge
trustExitCode = true
# 3 way compare. Only the middle window can be modified. Saving changes updates the current branch
cmd = "/c/Program\\ Files/WinMerge/WinMergeU.exe" -u -x -wr -wl -dl \"Local\" -dm \"Merge destination\" -dr \"Remote\" $LOCAL $BASE $REMOTE -o $MERGED
[diff]
tool = winmerge
[difftool "winmerge"]
name = WinMerge
trustExitCode = true
# Only the "Right" file can be modified. To change the file in the git project, make sure it is opened in the "Right" window
# For example, having branches master and bob with the master branch being current, the correct command for file comparison with the possibility to
# edit the file in the master branch is:
# "git difftool bob README.md" OR "git difftool bob master README.md"
# For example, having branches master and bob with the master branch being current, the correct command for directory comparison with the possibility to edit
# the files in the master branch is:
# "git difftool -d bob" OR "git difftool -d bob master"
cmd = "/c/Program\\ Files/WinMerge/WinMergeU.exe" -u -x -wl -dl \"Left\" -dr \"Right\" $LOCAL $REMOTE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment