The reason I am using BCompare.exe for the difftool instead of bcomp.exe is described here. In addition to the above, you need to tell git the path to bcomp.exe: git config -global "c:/program files (x86)/beyond compare 3/BCompare.exe" git config -global "c:/program files (x86)/beyond compare 3/bcomp.exe" Pretty much the only difference from above is using bc3 instead of bc: git config -global diff.tool bc3 git config -global difftool.prompt false git config -global difftool.bc3 trustExitCode true git config -global merge.tool bc3 git config -global mergetool.bc3 trustExitCode true Git for Windows Configuring Beyond Compare 3 Git for Linux Now, among other things, you can right-click files in VS and choose Compare with Unmodified to open Beyond Compare. Specifically, you need to open git/config in the repo and add the following: tool = bc4 cmd = \"C:\\Program Files\\Beyond Compare 4\\BComp.exe\" \"$LOCAL\" \"$REMOTE\" tool = bc4 cmd = \"C:\\Program Files\\Beyond Compare 4\\BComp.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" Instead of using your global git config, it forces you to change the git config file in the repo. Not to mention, it doesn’t support 3-way merge. However, I don’t find it as useful as I do Beyond Compare. Visual Studio includes a builtin diff viewer that is pretty nice. You don’t need to do anything special to get directory diffs working on Windows. On Windows, in addition to the above commands, you need to tell git the path to bcomp.exe: git config -global difftool.bc.path "c:/program files/beyond compare 4/bcomp.exe" git config -global mergetool.bc.path "c:/program files/beyond compare 4/bcomp.exe" To make this affect all new sessions, change the dropdown at the bottom of the dialog from Use for this view only to Also update session defaults before you click OK. In the Folder Compare, click the Rules toolbar button (referee icon). The approach I like is updating Beyond Compare to follow the symlinks. There are a couple of ways to fix this ( courtesy of StackOverflow). By default, git uses symlinks to do the directory diff and BC4 will not follow those by default yielding something that looks like this: git difftool -dir-diff), I had to tweak the settings a little bit. In order to get directory diffs working (e.g. Run these commands from terminal: git config -global diff.tool bc git config -global difftool.prompt false git config -global difftool.bc trustExitCode true git config -global merge.tool bc git config -global mergetool.bc trustExitCode true To get it working on any linux flavor is pretty straight forward. Configuring Beyond Compare 4 Git for Linux It is cross-platform and makes diffs and 3-way merges very easy to understand and visualize. To modify it, go to "C:\Users\USERNAME\AppData\Roaming\Visual Studio Comparison Tools" and edit file with name Compare has been my favorite comparison tool for a while now. Since version 3.3.13 nfig is deployed automatically in ERROR level.lefttitle="Selection ()"Ĭ:\Program Files\Beyond Compare 4\BComp.exeĬ:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\devenv.exe ub "" ""Ĭ:\Program Files (x86)\Beyond Compare 3\BComp.exe This file tells which comparison tool is being used and with which parameters.Ĭ:\Program Files (x86)\WinMerge\WinMergeU.exe The tool will create a config file to "C:\Users\YOURUSERNAME\AppData\Roaming\Visual Studio Comparison Tools\config.xml". NOTE! VSDiff comparison still has some issues with comparing cliboard and a text selection!įor visual studio 2005/2008/2010 and source code, see the github page: Ĭompare selected area or the opened file to the clipboard: Tested to work with Beyond Compare 3 and 4. By default uses Beyond Compare if found, then WinMerge ( ) and if neither is found uses VSDiff to compare files. Features: Comparing two files, selecting folders for comparison from the solution explorer and comparing (and merging) clipboard to a file or selected area in a file. Visual Studio Comparison Tools is an extension for Visual Studio which uses external tools to compare files, folders and clipboard.
0 Comments
Leave a Reply. |