When I type git diff
, I want to view the output with my visual diff tool of choice (SourceGear \"diffmerge\" on Windows). How do I configure git to do this?
Install meld
# apt-get install meld
Then choose that as difftool
$ git config --global diff.tool meld
If tou want to run it on console type:
$ git difftool
If you want to use graphic mode type:
$ git mergetool
And the output would be:
'git mergetool' will now attempt to use one of the following tools:
meld opendiff kdiff3 tkdiff xxdiff tortoisemerge gvimdiff diffuse
diffmerge ecmerge p4merge araxis bc3 codecompare emerge vimdiff
Merging:
www/css/style.css
www/js/controllers.js
Normal merge conflict for 'www/css/style.css':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (meld):
So just press enter to use meld(default), this would open graphic mode, make the magic save and press that that resolve the merge. That's all