Git Diff 插件配置

1.查看系统支持哪些插件

使用$ git difftool --tool-help命令来查看系统支持哪些Git Diff插件。

$ git difftool --tool-help
'git difftool --tool=<tool>' may be set to one of the following:
                vimdiff
                vimdiff2
                vimdiff3

The following tools are valid, but not currently available:
                araxis
                bc
                bc3
                codecompare
                deltawalker
                diffmerge
                diffuse
                ecmerge
                emerge
                examdiff
                gvimdiff
                gvimdiff2
                gvimdiff3
                kdiff3
                kompare
                meld
                opendiff
                p4merge
                tkdiff
                winmerge
                xxdiff

Some of the tools listed above only work in a windowed
environment. If run in a terminal-only session, they will fail.

2.安装DiffMerge插件

https://sourcegear.com/diffmerge/

电脑是win64所以在首页选择Windows Installer(64big),下载后安装。

3.根据DiffMerge官方文档,去配置

进入DiffMerge首页--->“Products”--->"DiffMerge"--->"Documentation"--->"Integration With Third-Party Software"


img_0dce860a2f556be9d8f6c199b9fd14d4.png

根据之前不同的安装 Git 方式,选择不同的配置方式

  1. GitHub for Windows or Git Bash Shell ;
  2. Git for Windows (MSysGit) or Git Cmd ;
  3. Git Under Cygwin or GitBash Shell ;

注意上图中这种分成三行的命令,是一个命令行,执行时候,分三次复制,并加空格。不要一下复制,直接执行;

C:\> git config --global difftool.diffmerge.cmd
    "C:/Program\ Files/SourceGear/Common/DiffMerge/sgdm.exe
        \"$LOCAL\" \"$REMOTE\""

如果安装不成功,检查DiffMerge安装的目录,和命令中目录是否一致。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值