Alex Rivera | Logout

Mac specific optimizations in ~/.gitconfig

Asked 2010-10-18T09:45:04.727
13

I read that discussion about the content of "~/.gitconfig" on Linux: https://stackoverflow.com/questions/267761/what-does-your-gitconfig-contain

I know some Mac specific optimizations, such as using "mate" as default editor:

[core]
    editor = mate -w

or using opendiff as diff editor:

[diff]
    external = opendiff

Do you know other Mac specific optimizations (and/or tools) that I could install/configure in "~/.gitconfig" file in order to get a very user-friendly git?

Edit
Report

1 Answer

23

I use opendiff and textmate as external tools for git. You can configure them by running the following commands in 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

Alternatively you can configure the gitconfig file by adding the following:

[diff]
    tool = opendiff

[merge]
    tool = opendiff

[core]
    editor = mate -w

The difftool and mergetool is only available after version 1.6.3

answered 2010-11-23T18:12:06.047

Your Answer