by pmoriarty · 7y ago · 0 comments
I want every dotfile I use to be independent of the rest and a log that shows changes to just that one dotfile, so I store each of them in separate repos and use GNU Stow[1] to manage them.
The above is actually a bit of an oversimplification of what I do, as I store related dotfiles in a single repo as well, so that (for example) all my weechat dotfiles are in a single repo, as I rarely want to checkout a single file independantly of the rest there.
That doesn't really follow; it is easy to check out old versions of a single file with git:
git checkout <revision> <filename>
for ".bashrc from two commits ago on the current branch", that would be: git checkout HEAD~2 .bashrc
Hopefully I'm not just misunderstanding your point here.A Git repo per small text file seems like overkill to me.
Something like:
git checkout c3f2ab -- configs/.vimrc