I'm just starting to work with Git. I would like to use TortoiseMerge as the difftool and mergetool.
In my $HOME/.gitconfig
I have the following sections. I've removed the user and color sections for this question.
[merge] tool = tortoisemerge [mergetool "tortoisemerge"] cmd = \"TortoiseMerge.exe\" -base:\"$BASE\" -mine:\"$LOCAL\" -theirs:\"$REMOTE\" -merged:\"$MERGED\" [diff] tool = tortoisemerge [difftool "tortoisemerge"] cmd = \"TortoiseMerge.exe\" -base:\"$BASE\" -mine:\"$LOCAL\" -theirs:\"$REMOTE\" -merged:\"$MERGED\"
If I type tortoisemerge at the Git Bash prompt it loads. It is known to be on the path. But if I type the command I get the following error.
Rich:mygittest (master *) $ git difftool error: 'tortoisemerge' can only be used to resolve merges merge tool candidates: kompare emerge vimdiff No known merge resolution program available. external diff died, stopping at readme.txt. Rich:mygittest (master *) $
What am I not understanding to make this work? Tortoisemerge is installed with TortoiseSVN.
Specify a custom command for viewing diffs. git-difftool ignores the configured defaults and runs $command $LOCAL $REMOTE when this option is specified. Additionally, $BASE is set in the environment. When git-difftool is invoked with the -g or --gui option the default diff tool will be read from the configured diff.
Usage. Run Git Difftool: Diff File from the Command Palette or use ⌥⌃D to diff the currently open file. Run Git Difftool: Diff Project from the Command Palette or use ⌃⇧D to diff the whole project.
Use git mergetool to run one of several merge utilities to resolve merge conflicts. It is typically run after git merge. If one or more <file> parameters are given, the merge tool program will be run to resolve differences on each file (skipping those without conflicts).
The following settings work fine for me. However, I am using TortoiseGit not TortoiseSVN. Notice the difference in the parameters for diff.
[diff] tool = tortoisediff [difftool] prompt = false [merge] tool = tortoisemerge [mergetool] prompt = false keepBackup = false [difftool "tortoisediff"] cmd = \""c:/Program Files/TortoiseGIT/bin/TortoiseGitMerge.exe"\" -mine "$REMOTE" -base "$LOCAL" [mergetool "tortoisemerge"] cmd = \""c:/Program Files/TortoiseGIT/bin/TortoiseGitMerge.exe"\" -base "$BASE" -theirs "$REMOTE" -mine "$LOCAL" -merged "$MERGED"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With