23 ms·
The problem with keeping all dotfiles in a single repo is that if you want to get an older version of one particular dotfile, you'll also be getting older versi
by pmoriarty 8y ago
The problem with keeping all dotfiles in a single repo is that if you want to get an older version of one particular dotfile, you'll also be getting older versions of other dotfiles as well.
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.
[1] = https://www.gnu.org/software/stow/ https://www.gnu.org/software/stow/
- benley 8y ago> you want to get an older version of one particular dotfile, you'll also be getting older versions of other dotfiles as well. 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.
- bruxis 8y agoThis sounds like a somewhat uncommon use case to me, but wouldn't a simple git per-file checkout work here? Something like: git checkout c3f2ab -- configs/.vimrc
- boardwaalk 8y agoGit can fetch a single file as of any commit with 'git show' and show the history of any single file with 'git log' or 'git diff'. Any decent web/GUI tool will do these things too. A Git repo per small text file seems like overkill to me.
- njharman 8y agoOr you could learn how git already does those things