Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Notepad++ Compare as the diff tool in git?

Is there an easy way to setup Notepad++'s Compare plugin as the diff tool for Git on Windows? I'm not sure whether it can be called from the command line so maybe not.

like image 929
bgcode Avatar asked Aug 05 '11 00:08

bgcode


2 Answers

As far as I know, Notepad++ doesn't allow custom command-line options for its plugins, so it would be a tad tricky to do so. You would need to create a wrapper script for it or call the executable directly. In my humble opinion, not worth it given that there are some very nice options for diff tools out there.

In any case, git difftool allows you to specify what exactly you'd like git to use for diff. You'll add this to your .gitconfig file:

[diff]
tool = araxis // enter your tool of choice here, Araxis is just an example

If you'd like to read more about it, here's a link to the man page: http://www.kernel.org/pub/software/scm/git/docs/git-difftool.html

like image 96
ambagesia Avatar answered Sep 23 '22 14:09

ambagesia


I've just posted a solution to a similar question over here. Btw, one of the main points in preferring N++ as a diff viewer is, for instance, that if you're anyway handling Git-managed code in N++, then you can always directly "Compare against GIT base" (v1.5.6.3!). Another reason is of course looking at a diff in a "real" editor with syntax highlighting and all the other well known goodies at hand.

like image 34
ufo Avatar answered Sep 23 '22 14:09

ufo