git mergetool
is fully configurable so you can pretty much chose your favourite tool.
The full documentation is here: http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html
In brief, you can set a default mergetool by setting the user config variable merge.tool
.
If the merge tool is one of the ones supported natively by it you just have to set mergetool.<tool>.path
to the full path to the tool (replace <tool>
by what you have configured merge.tool
to be.
Otherwise, you can set mergetool.<tool>.cmd
to a bit of shell to be eval'ed at runtime with the shell variables $BASE, $LOCAL, $REMOTE, $MERGED
set to the appropriate files. You have to be a bit careful with the escaping whether you directly edit a config file or set the variable with the git config
command.
Something like this should give the flavour of what you can do ('mymerge' is a fictional tool).
git config merge.tool mymerge
git config merge.mymerge.cmd 'mymerge.exe --base "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"'
Once you've setup your favourite merge tool, it's simply a matter of running git mergetool
whenever you have conflicts to resolve.
The p4merge tool from Perforce is a pretty good standalone merge tool.