ABDiff 帮助

Git 集成

这假设您已经安装了abd,并且您熟悉Git差异和合并工作流程

配置合并

运行一次这些:

git config --global merge.tool abd
git config --global mergetool.abd.trustExitCode true
git config --global mergetool.abd.cmd 'abd --base "$BASE" --local "$LOCAL" --remote "$REMOTE" --result "$MERGED"'

从有文件冲突的文件夹中进行测试:

git mergetool

调用时,ABDiff会打开一个窗口,并等待您关闭它。 如果您在关闭之前保存合并的文件,Git将标记冲突已解决。

当MERGED文件包含Git冲突标记时,ABDiff通过用空行替换每个冲突块(大边每行一个)来将它们隐藏在“结果”窗格中。 在您保存之前,磁盘上的文件不会更改。

配置比较

运行一次这些:

git config --global diff.tool abd
git config --global difftool.prompt false
git config --global difftool.abd.cmd 'abd --local "$LOCAL" --remote "$REMOTE"'

测试它:

git difftool

Git访问

ABDiff在可用时显示Git历史记录,为您提供明确授予对其存储库的访问权限。 这要求您在设置>文件夹访问列表中添加项目的根文件夹。

如果一个公共文件夹下有多个存储库,您可能需要将该公共文件夹添加到列表中,以此来授予所有这些存储库的权限。 参见设置

重置配置

要停止使用ABDiff,运行以下操作:

# reset merge tool
git config --global --unset-all merge.tool
git config --global --unset-all mergetool.abd.cmd
git config --global --unset-all mergetool.abd.trustExitCode

# reset diff tool
git config --global --unset-all diff.tool
git config --global --unset-all difftool.abd.cmd
git config --global --unset-all difftool.prompt

相关主题