开发者

Can you reference the environment in $HOME/.gitconfig

开发者 https://www.devze.com 2023-03-06 20:39 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消