.gitignore with `/*` to check $HOME into Git
Evan R. Murphy
evanrmurphy at gmail.com
Fri Oct 18 00:17:23 CEST 2013
Howdy!
First post. I found this group through this post on the Unix & Linux Stack
Exchange:
http://unix.stackexchange.com/questions/46538/are-there-pitfalls-to-putting-home-in-git-instead-of-symlinking-dotfiles/46835#46835
I'm experimenting with checking my $HOME directory into Git for the first
time. Yesterday I read about various ways of doing this and experimented
with vcsh, which is a really cool script.
Today I'm trying out a very simple method. It just uses one Git repo
located in $HOME with a .gitignore file that has contents like the
following:
# Ignore everything by default
/*
# "Unignore" this .gitignore file
!/.gitignore
# Add here everything else you want to unignore
!/.vimrc
This seems like a simple way to override Git's greediness while avoiding
the problems that can arise with nested git repos (just don't unignore them
and they won't cause problems).
Can anyone here more experienced with versioning $HOME advise on problems
that might arise with this approach?
Thanks,
Evan
More information about the vcs-home
mailing list