MAC 上git集成比较diff工具和merge合并工具的使用
2015-08-03 11:09
1616 查看
1.Beyond Compare
特点:
下载地址:http://www.scootersoftware.com/download.php
破解方法:http://www.puteulanus.com/archives/677
[diff]
tool=bc3
[difftool "bc3"]
cmd=/Applications/BeyondCompare.app/Contents/MacOs/bcomp \"$LOCAL\" \"$PWD/$REMOTE\"
[merge]
tool = bc3
conflictstyle = diff3
[mergetool "bc3"]
cmd=/Applications/BeyondCompare.app/Contents/MacOs/bcomp \"$PWD/$LOCAL\" \"$PWD/$REMOTE\" \"$PWD/$BASE\" \"$PWD/$MERGED\"
keepBackup = false
trustExitCode =false
效果如下:
在最下方的编辑框中保留你要保留的内容。
2.vimdiff
特点:支持Linux、MAC ,无需安装。
git config —global merge.tool vimdiff
git config —global mergeconflictstyle diff3
git config —global mergetool.prompt false
使用ctrl+w,j来切换不同的文件
合并完冲突之后,使用 :wqa 完成合并
3.meld
mac 上安装meld
只能使用MacPorts 或者 brew(本人安装的是brew,使用brew安装meld)
brew install meld
某些机器可能不好使,根据她的指导使用下面的方式下载
brew install homebrew/x11/meld
如果中间中断,重新执行brew install homebrew/x11/meld
安装后执行 meld后的效果如下
整合到git
[diff]
tool=meld
[difftool "meld"]
cmd=/usr/local/bin/meld \"$LOCAL\" \"$PWD/$REMOTE\"
[merge]
tool = meld
[mergetool "meld"]
cmd=/usr/local/bin/meld \"$PWD/$LOCAL\" \"$PWD/$REMOTE\"
\"$PWD/$MERGED\"
git mergetool的效果如下
最后个人还是推荐使用beyond compare 。首先vimdiff 不够清楚明了,而meld只能比较3个文件。beyond compare 界面也挺好看的,能够比较多个文件。
特点:
下载地址:http://www.scootersoftware.com/download.php
破解方法:http://www.puteulanus.com/archives/677
[diff]
tool=bc3
[difftool "bc3"]
cmd=/Applications/BeyondCompare.app/Contents/MacOs/bcomp \"$LOCAL\" \"$PWD/$REMOTE\"
[merge]
tool = bc3
conflictstyle = diff3
[mergetool "bc3"]
cmd=/Applications/BeyondCompare.app/Contents/MacOs/bcomp \"$PWD/$LOCAL\" \"$PWD/$REMOTE\" \"$PWD/$BASE\" \"$PWD/$MERGED\"
keepBackup = false
trustExitCode =false
效果如下:
在最下方的编辑框中保留你要保留的内容。
2.vimdiff
特点:支持Linux、MAC ,无需安装。
git config —global merge.tool vimdiff
git config —global mergeconflictstyle diff3
git config —global mergetool.prompt false
使用ctrl+w,j来切换不同的文件
合并完冲突之后,使用 :wqa 完成合并
3.meld
mac 上安装meld
只能使用MacPorts 或者 brew(本人安装的是brew,使用brew安装meld)
brew install meld
某些机器可能不好使,根据她的指导使用下面的方式下载
brew install homebrew/x11/meld
如果中间中断,重新执行brew install homebrew/x11/meld
安装后执行 meld后的效果如下
整合到git
[diff]
tool=meld
[difftool "meld"]
cmd=/usr/local/bin/meld \"$LOCAL\" \"$PWD/$REMOTE\"
[merge]
tool = meld
[mergetool "meld"]
cmd=/usr/local/bin/meld \"$PWD/$LOCAL\" \"$PWD/$REMOTE\"
\"$PWD/$MERGED\"
git mergetool的效果如下
最后个人还是推荐使用beyond compare 。首先vimdiff 不够清楚明了,而meld只能比较3个文件。beyond compare 界面也挺好看的,能够比较多个文件。
相关文章推荐
- RPC failed; result=22, HTTP code = 411
- git更新已經刪除的文件
- 提取Git每次提交后Commit的文件
- GIT迁移服务器
- 分布式版本管理git入门指南使用资料汇总及文章推荐
- Git远程操作详解
- 25个 Git 进阶技巧(翻译)
- 详解版本控制利器Git,SVN的异同以及适用范围
- Ruby实现的删除已经合并的git分支脚本分享
- 在 Shell 提示符中显示 Git 分支名称的方法
- Git使用基础篇(一些常用命令和原理)
- git fork同步是什么意思?
- Python的高级Git库 Gittle
- 使用GIT进行源码管理――GUI客户端小结
- 使用git代替FTP部署代码到服务器的例子
- linux系统安装git及git常用命令
- 分享下自己总结的Git常用命令
- Git 常用命令速查表(图文+表格)
- mac git xcrun error active developer path 错误
- git报错