Ben*_*ine 13 git macos configuration dvcs
我在Linux上阅读了关于"〜/ .gitconfig"内容的讨论:https://stackoverflow.com/questions/267761/what-does-your-gitconfig-contain
我知道一些Mac特定的优化,例如使用"mate"作为默认编辑器:
[core]
editor = mate -w
Run Code Online (Sandbox Code Playgroud)
或使用opendiff作为差异编辑器:
[diff]
external = opendiff
Run Code Online (Sandbox Code Playgroud)
您是否知道我可以在"〜/ .gitconfig"文件中安装/配置的其他Mac特定优化(和/或工具)以获得非常用户友好的git?
Ron*_*iew 23
我使用opendiff和textmate作为git的外部工具.您可以通过在bash中运行以下命令来配置它们:
#TextMate as the default editor
git config --global core.editor "mate -w"
#Opendiff (FileMerge) to resolve merge conflicts:
git config --global merge.tool opendiff
#Opendiff (FileMerge) as diff tool
git config --global diff.tool opendiff
Run Code Online (Sandbox Code Playgroud)
或者,您可以通过添加以下内容来配置gitconfig文件:
[diff]
tool = opendiff
[merge]
tool = opendiff
[core]
editor = mate -w
Run Code Online (Sandbox Code Playgroud)
difftool和mergetool仅在1.6.3版之后可用