使用Kdiff3 来解决Git的文件冲突
2011-10-25 11:13
489 查看
Kdiff3 的下载地址为:
http://kdiff3.sourceforge.net/
要想在Git GUI 中增加Merge Tool 有2种方式:
用记事本打开它,把下面的文本加进去就行了。
注:1,kdiff3.exe 的路径肯定是你安装Kdiff3的路径。2,不要盲目复制看清楚path与你的文件系统目录是有区别的哈。
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:
Add the KDiff3 directory to your Windows System Path (e.g. C:\Program Files\KDiff3\)
Add kdiff3 as your Git mergetool (From Git Bash, run git config --global merge.tool kdiff3)
Add kdiff3 complete path to Git Config (From Git Bash, run git config --global meregtool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe")
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
http://kdiff3.sourceforge.net/
要想在Git GUI 中增加Merge Tool 有2种方式:
一,在”.gitconfig ” 文件中进行修改。
.gitconfig 文件通常会在用记事本打开它,把下面的文本加进去就行了。
[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:
Add the KDiff3 directory to your Windows System Path (e.g. C:\Program Files\KDiff3\)
Add kdiff3 as your Git mergetool (From Git Bash, run git config --global merge.tool kdiff3)
Add kdiff3 complete path to Git Config (From Git Bash, run git config --global meregtool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe")
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
相关文章推荐
- 有没有人告诉我 如果使用GIT时,两个人同时修改了同一文件 这种冲突一般有哪几种解决方式?
- 有没有人告诉我 如果使用GIT时,两个人同时修改了同一文件 这种冲突一般有哪几种解决方式?
- git 使用 meld 解决冲突文件
- Xocde使用Git解决文件冲突
- windows中使用Git如何解决文件冲突?
- Git使用手册/Git教程:git pull origin 拉取代码到本地,解决拉取代码时发生的文件冲突
- 在使用svn或者git时解决冲突后打不开工程文件的解决方法
- 使用git pull文件时和本地文件冲突怎么解决
- 1git命令的使用,查看git仓库状态,添加文件到git跟踪,git提交,查看git分支,查看git仓库日志信息,切换git分支,解决git分支合并后出现冲突的问题
- AndroidStudio Git的使用(主要是解决文件冲突)
- 1git命令的使用,查看git仓库状态,添加文件到git跟踪,git提交,查看git分支,查看git仓库日志信息,切换git分支,解决git分支合并后出现冲突的问题
- 使用git pull文件时和本地文件冲突解决方案
- 导入extjs、jquery 文件时$使用冲突问题解决方法
- linux使用flock文件锁解决crontab冲突问题
- git pull 和本地文件冲突问题解决
- 解决为什么Git中有时候使用.gitignore也无法忽略一些文件
- Eclipse上GIT插件EGIT使用手册--解决推送冲突
- linux使用flock文件锁解决crontab冲突问题
- 使用git pull文件时和本地文件冲突怎么办?
- Git Patch使用: 生成,导入,解决冲突