Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you reference the environment in $HOME/.gitconfig

Tags:

git

I've got an NFS mounted home directory on most of the machines I work on with a .gitconfig that specifies a hard-coded path to $HOME/.gitignore for core.excludesfile. I've recently started working on another box that doesn't mount that home directory, and the path to my home directory there is different. I would like to keep the files consistent (I don't want to edit the .gitconfig every time I copy my dotfiles to a new box), so I'd like to put this in .gitconfig:

excludesfile = $HOME/.gitignore

Sadly, git does not expand $HOME. Is there anyway to get that functionality?

like image 447
William Pursell Avatar asked May 19 '11 13:05

William Pursell


1 Answers

It looks like excludesfile understands ~ for referencing the home directory.

like image 163
CharlesB Avatar answered Oct 02 '22 17:10

CharlesB