Re:Using GNU Stow to manage your dotfiles
by Argorak on Thursday September 05, 2013 @01:16AM
(#6332303)
For git repositories that are not touched very often, you can move the .git directory to something that isn't picket up automatically. Use it like this:
mv .git dot_git
git --git-dir="dot_git" add ...
Thats also a nice trick if you need a git repos in a git repos, e.g. for integration test for libraries interacting with git.
Like, say you thought ~/src/xulrunner was a git repo, but it was actually managed with hg or maybe was extracted from a tarball. Whereas normally executing some git command would complain that this is not a repo, if your ~ is a git repo then git will happily execute whatever you told it to on your dotfiles repo.