Search code examples
gitdiffnotepad++

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.


Solution

  • 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