超越与Diff 2分支同时进行比较

时间:2010-07-29 18:45:25

标签: git branch beyondcompare difftool

>>git difftool branch1 branch2打开我的difftool(Beyond Compare:BC)与每个在分支之间有差异的文件。 我必须在每个文件之后关闭BC,只是为了重新打开下一个文件。

BC可以区分整个目录和多个文件。

有没有办法让git difftool同时打开所有文件,或同时区分整个树?

2 个答案:

答案 0 :(得分:18)

从git v1.7.11开始,您可以使用git difftool --dir-diff来执行目录差异。

以下答案适用于早于v1.7.11的git安装。


此问题与BC无关,但与git的工作方式无关。 幸运的是,此网址有一个解决方案 - git-diffall

答案 1 :(得分:14)

我使用these commands to set Beyond Compare 4(尽管你看到的是bc3)作为差异/合并工具:

git config --global diff.tool bc3
git config --global difftool.bc3.path" C:/ Program Files / Beyond Compare 4 / bcomp.exe"

git config --global merge.tool bc3
git config --global mergetool.bc3.path" C:/ Program Files / Beyond Compare 4 / bcomp.exe"

然后我比较了这样的两个分支,其中" oldbranchname"和" newbranchname"是我想要比较的两个分支的名称。

git difftool -d --tool = bc3 oldbranchname newbranchname

我得到了文件夹视图,好像我将两个文件夹进行了比较。唯一值得注意的是它在比较中不会显示相同的文件,但这并没有让我困扰。