Setting TortoiseGitMerge in msysgit as the Git mergetool

I use git in command-line using msysgit but I use the TortoiseGit’s merge tool to resolve conflicts. After updating TortoiseGit to version 1.8 the “git mergetool” command stopped working. That’s because they’ve changed the name of the .exe file from TortoiseMerge.exe to TortoiseGitMerge.exe. One simple solution is to create a copy of that file with the previous name. I did that at first, but it was bothering me, as if something wasn’t right. Then I figured it out and here’s how I solved it:

git config --global merge.tool tortoisemerge
git config --global mergetool.tortoisemerge.cmd '"C:/Program Files/TortoiseGit/bin/TortoiseGitMerge.exe" -base:"$BASE" -theirs:"$REMOTE" -mine:"$LOCAL" -merged:"$MERGED"'
Advertisements

2 thoughts on “Setting TortoiseGitMerge in msysgit as the Git mergetool

  1. Will this work if I’m using cygwin instead of msys?

    I have noticed that cygwin mounts the C: drive in /cygdrive/c. Would this require a different path such as git config –global mergetool.tortoisemerge.cmd ‘”cygdrive/c/Program Files/TortoiseGit/bin/TortoiseGitMerge.exe” -base:”$BASE” -theirs:”$REMOTE” -mine:”$LOCAL” -merged:”$MERGED”‘

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s