Git on Windows: How do you set up a mergetool? – Stack Overflow

Git on Windows: How do you set up a mergetool? – Stack Overflow

To follow-up on Charles Bailey’s answer, here’s my git setup that’s using p4merge (free cross-platform 3way merge tool); tested on msys Git (Windows) install:

git config –global merge.tool p4merge

git config –global mergetool.p4merge.cmd ‘p4merge.exe \”$BASE\” \”$LOCAL\” \”$REMOTE\” \”$MERGED\”‘

or, from a windows cmd.exe shell, the second line becomes :

git config –global mergetool.p4merge.cmd “p4merge.exe \”$BASE\” \”$LOCAL\” \”$REMOTE\” \”$MERGED\””

The changes (relative to Charles Bailey):

added to global git config, i.e. valid for all git projects not just the current one

the custom tool config value resides in “mergetool.[tool].cmd”, not “merge.[tool].cmd” (silly me, spent an hour troubleshooting why git kept complaining about non-existing tool)

added double quotes for all file names so that files with spa

via Git on Windows: How do you set up a mergetool? – Stack Overflow.

Advertisements

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