Hacker News new | ask | show | jobs
by b3lm0nt 646 days ago
I use Gary Bernhardt's (non)-method, quoted here:

IMO you don't need a special tool to manage your home directory / dotfiles. Git is the tool. Your home directory is a repo with a .git directory like any other repo. No other tools; no symlinks; nothing else. Commit what you want and gitignore the rest. I've done this since 2008.

Never had a problem with it.

4 comments

That's what I do as well. Since you can .gitignore entire directories, that makes it easy. And one major advantage is having `git status` tell you if new things show up, so you can decide whether to track or ignore them (or change how/whether they're created in the first place).
One better, put a '*' in your .gitignore and then !.vimrc the files you do want to track.
yadm implements this model, but also allows for machine-specific branching and encrypted secrets (no secrets should be directly committed in git).
One version of this is to use a bare repo, as described in https://news.ycombinator.com/item?id=11070797
I switched to this method after using symlinks for years. This guide was helpful: https://queensidecastle.com/guides/tracking-your-home-direct...