git 与 Beyond Compare代码对比
2023-02-02 本文已影响0人
hao_developer
前提是安装git(需要在环境path配置)和Beyond Compare
在path后面追加:

<meta charset="utf-8">
git
中添加 Beyond Compare
作为 difftool
和mergetool
difftool
1. 查看是否允许bc
作为比较工具
git difftool --tool-help
返回:

包含 bc
、bc3
、 bc4
所以可以可以配置
2. 配置difftool
配置完成后,.gitconfig文件会自动增加以下截图配置
git config --global diff.tool bc4
git config --global difftool.bc4.path "C:\Program Files\Beyond Compare 4\BComp.exe"
.gitconfig
文件中也已经配置好了(C:\Users\Administrator中找到.gitconfig文件
)

3. 使用
在目标文件夹中出入cmd

输入指令git difftool
或者明确指定某个文件git difftool index.js

自动打开beyond compare
