Search code examples
gitunixosx-lionhome-directory

How to change the $HOME directory in Git


I would like to know, since I've been looking quite some time on how to do this, atleast in this community. would like to know how to change the $HOME directory in a Mac OS X Lion, in Git.

In other words, how do I make it so that my global user settings are saved in a folder like git and not right inside the main user folder? Or is it already like that? I basically want to keep a centralized place for all my files and stuff that I use in Git (for example, a .gitmessage.txt file, if I'm not mistaken, this shouldn't be hidden since it's a TXT file).

If you need more info don't hesitate to ask.


Solution

  • Read git config manual, it says about GIT_CONFIG environment variable.