Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac specific optimizations in ~/.gitconfig [closed]

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?

like image 494
Benoit Courtine Avatar asked Oct 18 '10 09:10

Benoit Courtine


1 Answers

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

like image 55
Ronnie Liew Avatar answered Oct 20 '22 00:10

Ronnie Liew