Keeping a "global" git-ignore file under version control
vcs-home at drmikehenry.com
Mon Jan 3 01:05:10 CET 2011
I've just started using git to version control my home directory
(including my ~/.gitconfig file). I'd like to configure git's
core.excludesfile setting to point to ~/.gitglobalignore. This
setting requires an absolute path. So in my ~/.gitconfig file,
# This works because the path is absolute:
excludesfile = /home/mike/.gitglobalignore
But because neither environment variables nor "~" are expanded,
neither of the following work::
# Neither of these will work:
excludesfile = ~/.gitglobalignore
excludesfile = $HOME/.gitglobalignore
Since I'm keeping ~/.gitconfig under version control, I don't
see how to share this configuration with multiple users (in
particular, with root, but I'd also like to share it with
coworkers if my experiments at home pan out).
Have any of you run into this problem and found a work-around?
I've seen a proposal for a git patch for this, but the
conversation stopped in August 2008.
More information about the vcs-home