In the Windows platform using the GUI is used to, so under the cmd command instead feel uncomfortable especially when using git, especially obvious (this is basically git in the work is necessary) the most common function of using git is to commit, add, compare differences and merge branches, In particular, in the case of changes in the number of files under the cmd command to look at the difference is particularly impersonal (the mouse constantly down) finally can not endure, so I would like to be able to use their most common way to compare differences? Because beyond Compare is always used at work, it is decided to edit the git configuration file as the default Git diff toolC:\Users\Administrator\.gitconfig and save, and then you can call diff and mergetool in git to passBeyond Compare view differences, This kind of effect seems more humane.
[gui]encoding = utf-8[i18n]commitencoding = utf-8[svn]pathnameencoding = Utf-8[user]email = [email protected]name = Huang yuan# use beyond Compare to view file differences [diff] #对比工具名称, must be consistent with the name in the Difftool key tool = Bc4[difftool "Bc4"] #beyond compare path and Invoke command #$ REMOTE means that the file after commit #local represents a commit to git file cmd = "\" D:/program files (x86)/beyond compare 4/bcomp.exe\ "\" $REMOTE \ "\" $ Local\ "" #合并分支 [merge] #对比工具名称 must be consistent with the name in the Mergetool key tool = Bc4[mergetool]prompt = False[mergetool "Bc4"] #beyond Compare path and invoke command cmd = "\" D:/program files (x86)/beyond compare 4/bcomp.exe\ "\" $LOCAL \ "\" $REMOTE \ "\" $BASE \ "\" $MERGED \ ""
Compare file differences:
Merge Branches, compare branch file differences:
use Difftool to see the differences between the two branches:All the different files will be in separateBeyond Compare Open and compare instead of directly comparing two branches of the folder, there is no direct use of cmd diff convenient
Another way: UseTortoisegityou can directly compare the differences of two branchesSource: <Http://oldratlee.com/post/2012-10-25/git-check-diff-between-tag-or-branch-using-gui-diff
>
- In the GIT project directory, right-click menu:
- À la carte items "git vs. Previous version"
How do I not see this menu item in the submenu of "Tortoisegit"?
- "Tortoisegit version diff Window" opens, which shows the difference between the workspace and the previous commit version by default
- Click on the Right button, select the branch or label to compare, the following list of files is two branches or the label of the diff related files. Double-click on the file entry, Tortoisegit will use the Tortoisegit configuration GUI diff view tool to view the file diff.
In fact, "Tortoisegit version diff Window" Right button selection, in addition to select branches or tags, you can also choose to specify the version, very convenient.
PS: A git tool can write n book, I am also drunk, it is necessary to make so complicated? or Windows design humanization, click the mouse to complete the desktop side of the Linux can never exceed the power of the system is also for people to use, if most people can not be very easy to use that can only hehe reference: Beyond Compare official website GIT Configure Windows to use beyond compare as a git diff and merge tool git how to use the GUI (graphical) Diff tool to view two branches or tabs under Diffgit using beyond compare as a comparison and merge tool for Git Diff With Beyond Compare
From for notes (Wiz)
Using beyond Compare as the default comparison and merging tool for git under Windows platform