• 使用Kdiff3 来解决Git的文件冲突


    Kdiff3 的下载地址为:

    http://kdiff3.sourceforge.net/

    要想在Git GUI 中增加Merge Tool 有2种方式:

    一,在”.gitconfig ” 文件中进行修改。

    .gitconfig 文件通常会在

    image

    用记事本打开它,把下面的文本加进去就行了。

    [merge]
            tool = kdiff3
    [mergetool "kdiff3"]
            path = c:/Program Files/KDiff3/kdiff3.exe
    [diff]
            tool = kdiff3
            guitool = kdiff3
    [difftool "kdiff3"]
            path = c:/Program Files/KDiff3/kdiff3.exe

    注:1,kdiff3.exe 的路径肯定是你安装Kdiff3的路径。2,不要盲目复制看清楚path与你的文件系统目录是有区别的哈。

    二,通过Git Bash来完成。

    因为没有试这种方式就直接上答案:

    I've been looking for the silver bullet solution to using KDiff3 as my git mergetool on Windows (using Git GUI).  I've finally got a solution that works in every Windows environment I've tried:

    1. Add the KDiff3 directory to your Windows System Path (e.g. C:\Program Files\KDiff3\)
    2. Add kdiff3 as your Git mergetool (From Git Bash, run git config --global merge.tool kdiff3)
    3. Add kdiff3 complete path to Git Config (From Git Bash, run git config --global meregtool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe")
    4. Go into Git GUI settings and set the mergetool to kdiff3 (if Git GUI doesn't pick up this setting from git config, which it should)

    Regardless of what I tried and/or read online, setting all possible settings is the only way KDiff3 works every time I select "Run Merge Tool" from the Git GUI right-click menu when there is a merge conflict.

    Cheers,
    -Kevin Wentworth

    参考地址:http://www.mainelydesign.com/blog/view/using-kdiff3-as-git-gui-merge-tool-on-windows-xp-windows-7

  • 相关阅读:
    第四节 哈希类型
    第三节 string类型
    第二节 redis的数据类型和一些通用的键命令
    第一节 Redis的安装配置
    第三十二节 定时器
    第三十一节 sed命令
    第三十节 awk命令
    第二十九节 cut命令
    第二十八节 函数和脚本调试
    Gartner 如何看 RASP 和 WAF?
  • 原文地址:https://www.cnblogs.com/jiguixin/p/2223571.html
Copyright © 2020-2023  润新知