5 ms·
If anyone is interested in setting up multiple platform dotfiles or more complicated setup, GNU stow [1] is just pure genius. It's a very simple approach which
by Walkman 11y ago
If anyone is interested in setting up multiple platform dotfiles or more complicated setup, GNU stow [1] is just pure genius. It's a very simple approach which works very well for me. It's described in this blog post: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to...
[1]: https://www.gnu.org/software/stow/ https://www.gnu.org/software/stow/
- ymse 11y agoYes. I don't understand why everyone keeps reinventing this tiny, full-featured symlink manager. It can also unstow and restow, ignore patterns, etc. Highly recommended.
- nnutter 11y agoI've occasionally ran into bugs where symlinks have caused problems. At the very least this is something to be aware of.
- jdreaver 11y agoThat looks really cool! The only minor problem I would have is you have to install stow before bootstrapping your dotfiles on a new machine, but that's obviously not a huge deal. I guess I could replace my bootstrap.sh script with a line to install stow, then a line to run stow.
- pmoriarty 11y agoThat blog post suggests putting the top-level "dotfiles" directory under version control. But doesn't it make more sense, at least with git, to put each individual subdirectory under dotfiles under in its own separate repo? With the blog post's solution, when you want to revert to an older revision of, say, your .vim or .emacs.d dotfiles you're also going to be automatially reverting your .bash and whatever other random dotfiles you have. With the latter solution, when you revert your dotfiles/vim or dotfiles/emacs subdirectory, you only get an older revision of your vim or your emacs files. Does that make sense?
- wahnfrieden 11y agoYou can revert changes to individual files or subtrees in git.
- pmoriarty 11y agoWith this stow solution, I wonder what happens when some program makes modifications directly to its own configuration files, without being aware that they're not directly under your home directory but symlinked under dotfiles somewhere. Will the symlinked file get modified? Or will the symlink be removed completely and a new file be put in its place, directly under your home directory and not under your stow directory at all. One program which I'm thinking of that can make modifications of its own config files is znc. weechat is another. There might be some other random program that does this too. I'm concerned that using stow for them might lead to disaster. Any advice from someone who's tried it with apps like that?