ILD

git使用beyond compare比较技巧
作者:Herbert Yuan 邮箱:yuanjp@hust.edu.cn
发布时间:2017-12-2 站点:Inside Linux Development

配置使用beyongd compare

1
2
$ git config --global diff.tool bc3
$ git config --global difftool.bc3.trustExitCode true


关闭确认

1
$ git config --global difftool.prompt false


按文件夹比较:

1
$ git difftool [-d|--dir-diff]


比较将要提交的untracked的新文件。

1
$ git add -N cpu/arm920t/raise.c

-N, --intent-to-add

           Record only the fact that the path will be added later. An entry for the path is placed in the index with no content. This is useful for, among other things, showing the unstaged content of such files with git diff and committing them with git commit -a.

添加一个空白文件,这样就会和空白文件对比。


文件夹比较时,由于git使用链接,所以BC设置为跟随链接:

Rules->Handling->Follow symbolic links


效果如下:


参考

https://stackoverflow.com/questions/26742525/how-to-suppress-confirmation-launch-difftool-y-n-iff-if-and-only-if-a

https://stackoverflow.com/questions/35304437/beyond-compare-with-git-difftool-dir-diff-hitting-an-issue-with-sym-links

https://www.scootersoftware.com/vbulletin/showthread.php?14732-Usability-skip-git-difftool-confirmation-prompt-and-or-enable-multi-tab-opening




Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.