MacOS – Defining some global GIT settings to be automatically inherited

gitmacosterminal

Sysnopsis

Coming from a Linux background I still find Apples' modifications to the Unix hierarchy somewhat confusing. Nevertheless these subtle changes make it difficult for me to quickly do what I need.

  • I shall explain my scenario in a linux setting as it would make the most sense, then hope someone can translate this into BSD/OS X lingo.
  • I do not like GUI-based things if theres a CLI alternative.

Problem

I recently installed GIT so I could work on a number of projects from my MacBook, in linux one can define default config settings in /etc/gitconfig which is first loaded into the users' configuration and then merged with ~/.gitconfig.

When I create this default global git configuration file inside /etc/gitconfig it has not effect when I run my aliases, unless I specifically define them for each user on the machine.

Could someone please suggest to me exactly how this default behaviour works on OS X?

Best Answer

This might help someone I found this config in the following location: /usr/local/git/etc/gitconfig