标签:
git的命令行貌似没有特别好用的UI工具,不管是Android Studio自带的还是其他的,完全代替命令行好像做不到。再加上对git来说没什么比diff和merge更正常不过的事情了。
“Git鼓励在工作流程中频繁使用分支与合并,哪怕一天之内进行许多次都没有关系。理解分支的概念并熟练运用后,你才会意识到为什么Git是一个如此强大而独特的工具,并从此真正改变你的开发方式。” 不是我说的,但是很贴切。
我用的工具是 DiffMerge,比较轻,官网是:http://www.sourcegear.com/diffmerge/
安装在 c 盘之后,需要在git里面配置下,DiffMerge_4.2.0.697.stable_x64 .msi,其中exe文件在C:\Program Files\SourceGear\Common\DiffMerge内是sgdm.exe。
1.安装DiffMerge
2.配置sgdm.exe路径C:\Program Files\SourceGear\Common\DiffMerge到windows环境变量的path下
3.配置git
git config --global diff.tool sgdm git config --global difftool.diffmerge.cmd ‘sgdm "$LOCAL" "$REMOTE"‘ git config --global merge.tool sgdm git config --global mergetool.diffmerge.cmd ‘diffmerge --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"‘ git config --global mergetool.diffmerge.trustExitCode true
4.用DiffMerge
在代码处理MERGING状态时,可以用命令 git mergetool 启动工具
标签:
原文地址:http://www.cnblogs.com/chenjie0949/p/4995566.html