WinMerge is a great free tool for merging conflicts when working with a version control system like Git or Subversion. To use it with Git(Hub) follow the following steps:
- Locate your .gitconfig file. If you’re using GitHub for Windows, you will certainly find it in your user folder.
- Add the following text at the bottom of the file:
1234[diff]tool = winmerge[mergetool "winmerge"]cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" \"$MERGED\"
If you’re still using a 32-bit version of Windows, Replace “Program Files (x86)” with “Program Files”.
- To merge a conflict, open a shell and browse to your repository’s root folder.
- Use the command
git mergetoolto merge the conflicts with WinMerge.
If WinMerge doesn’t open, Git might still be trying to use a different tool, try again with
git mergetool --tool=winmerge.