git diffmerge tool 配置
2013-08-03 11:08
591 查看
原文 http://twobitlabs.com/2011/08/install-diffmerge-git-mac-os-x/
摘录保存
最好安装 diffmerge installer, 如果安装了 dmg 文件, diffmerge 官方解决方法:
http://www.sourcegear.com/diffmerge/webhelp/sec__inst__mac.html
To install these extras:
设置git 的diffmerge tool
Now, whenever you want it to launch diffs just use difftool where you’d normally use diff:
# diff the local file.m against the checked-in version
git difftool file.m
# diff the local file.m against the version in some-feature-branch
git difftool some-feature-branch file.m
# diff the file.m from the Build-54 tag to the Build-55 tag
git difftool Build-54..Build-55 file.m
To resolve merge conflicts, just run git mergetool:
git mergetool
摘录保存
最好安装 diffmerge installer, 如果安装了 dmg 文件, diffmerge 官方解决方法:
http://www.sourcegear.com/diffmerge/webhelp/sec__inst__mac.html
To install these extras:
sudo cp Extras/diffmerge.sh /usr/bin/diffmerge sudo chmod 755 /usr/bin/diffmerge sudo cp Extras/diffmerge.1 /usr/share/man/man1/diffmerge.1 sudo chmod 644 /usr/share/man/man1/diffmerge.1
设置git 的diffmerge tool
git config --global diff.tool diffmerge git config --global difftool.diffmerge.cmd 'diffmerge "$LOCAL" "$REMOTE"' git config --global merge.tool diffmerge 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
Now, whenever you want it to launch diffs just use difftool where you’d normally use diff:
# diff the local file.m against the checked-in version
git difftool file.m
# diff the local file.m against the version in some-feature-branch
git difftool some-feature-branch file.m
# diff the file.m from the Build-54 tag to the Build-55 tag
git difftool Build-54..Build-55 file.m
To resolve merge conflicts, just run git mergetool:
git mergetool
相关文章推荐
- ubuntu下git配置difftool
- Git配置可视化的diff 和merge工具
- OSX下git diff/merge 可视化工具 P4Merge 环境配置步骤
- git diff/merge 配置
- Use vimdiff as git mergetool
- git difftool 第三方工具配置
- git gui diff/merge tool
- Beyond Compare as a Diff and Merge tool with Git
- cygwin下配置git difftool
- Git配置可视化的diff 和merge工具
- git配置diff、merge工具:kdiff3
- Mac安装Meld,并使用Meld作为git merge tool的工具
- 把vscode 用作git difftool
- git集成Beyond Compare,方便 diff 和 merge
- git merge —— 为什么比diff & patch好
- Howto use vimdiff as "git diff"'s diff tool
- git difftool bcompare
- Mac 安装git mergetool
- Git diff 配置
- 如何在windows上将git diff配置成使用Beyond Compare