Is it possible to use the diff tool in visual studio 2012 together with git? Using "devenv /diff fileA fileB" i can bring up a diff between two files, but how can i add a third (base file) as well, having 3 views side by side.
Im currently using TortoiseGit and BeyondCompare.
Git can be configured to use any generic diff tool, not only the one it knows out of the box. To call a generic diff tool, set the diff.tool
configuration variable to a custom diff tool alias, say "vs2012", by typing git config --global diff.tool vs2012
and create a corresponding cmd
variable for that diff tool alias by typing git config --global difftool.vs2012.cmd <path_to_devenv> -diff "$LOCAL" "$REMOTE"
. Note that I'm using a dash instead of a slash for the "diff" option to work around MSYS path mangling issues, and luckily devenv also accepts dashes for command line options. Now you should be able to call the VS2012 diff tool by typing git difftool
.
For merging, I guess I have to disappoint you, devenv /diff
only accepts exactly two files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With