Does anyone have experience using GNU Stow for managing dot files? I’m especially interested in using it to build a git repo to include my .vimrc file so I can sync it between hosts.
I know I’ve seen other methods, such as making your home directory a bare git repo, so you can check-in your config files without moving them. There is also the chezmoi golang project.
How do others sync .vimrc between hosts?


I agree with @glad_cat@lemmy.sdf.org, all of these are just different ways to skin the cat. Whatever gets the files in the proper directories. Once you pick one (even arbitrarily, to a degree), you’ll very likely find no reason to push you toward another solution. I myself use symlinks with GNU cp -s
I’ve never heard of
cp -faTsbefore. I did some experimenting and was surprised that it was recursive. I thought you needed an-Rfor that, but you don’t. So,cp -faRTsappears to do the same thing, but is funnier.In any case, thanks for sharing your repo. I take it, that after the initial install, you can just repeatedly
git pull https://git.sr.ht/~igemnace/vim-configand then runvim-config/scripts/install-cfgto keep your config files up-to-date.Right! Recursive is implied by
-aYep. There’s a single
./installscript in project root that callsinstall-cfgandinstall-plugins. I only really need to run it once (first time I set up on a machine), and every time I add a new file. If all I’ve done is update existing files, a simplegit pullwill update my dotfiles’ content automatically, as everything is symlinked already.Nice! I never knew cp could do that. No more struggling to remember in which order the
lnparameters should be!Worth noting that this is GNU-specific! For macOS for example, you’d have to install GNU userland (e.g. from homebrew) to get the flag. There’s still value in using other solutions (such as
ln), portability-wise.As an aside: I mostly think of the
lnparam orders as exactly the same ascpandmv:cp FROM TO mv FROM TO ln [-s] FROM TOMaybe that could help!