Can you reference the environment in $HOME/.gitconfig
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/.gi开发者_如何学JAVAtignore
Sadly, git does not expand $HOME
. Is there anyway to get that functionality?
It looks like excludesfile understands ~
for referencing the home directory.
精彩评论