Getting Beyond Compare to Diff 2 Branches Simultaneously

后端 未结 2 567
情深已故
情深已故 2021-01-31 05:51

>>git difftool branch1 branch2 opens my difftool (Beyond Compare:BC) with every file that has a diff between the branches. I have to close BC after each file

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-31 06:14

    I used these commands to set Beyond Compare 4 (despite the bc3 you see in them) as the diff / merge tools:

    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"

    Then I compared two branches like this, where "oldbranchname" and "newbranchname" are the names of the two branches I wanted to compare.

    git difftool -d --tool=bc3 oldbranchname newbranchname

    I get the folder view as if I compared two folders with beyond compare. The only thing of note is that it will not show identical files in the comparison, but that has not bothered me.

提交回复
热议问题