Related:<p><i>Using GNU Stow to manage your dotfiles (2012)</i> - <a href="https://news.ycombinator.com/item?id=25549462" rel="nofollow">https://news.ycombinator.com/item?id=25549462</a> - Dec 2020 (113 comments)<p><i>Using GNU Stow to manage dotfiles (2013)</i> - <a href="https://news.ycombinator.com/item?id=15196141" rel="nofollow">https://news.ycombinator.com/item?id=15196141</a> - Sept 2017 (24 comments)<p><i>Using GNU Stow to manage your dotfiles</i> - <a href="https://news.ycombinator.com/item?id=8487840" rel="nofollow">https://news.ycombinator.com/item?id=8487840</a> - Oct 2014 (68 comments)<p><i>Using GNU Stow to manage your dotfiles</i> - <a href="https://news.ycombinator.com/item?id=6331485" rel="nofollow">https://news.ycombinator.com/item?id=6331485</a> - Sept 2013 (69 comments)
Been doing this for about a decade, it works nicely. Def recommend stows `--no-folding` flag (which prevents it from symlinking directories, just files)<p>obligatory vanity link: <a href="http://noriceno.life" rel="nofollow">http://noriceno.life</a>
Huh, I guess I implemented something like stow for myself without realizing it.<p>I keep my dotfiles in a private git repo, and in that repo is a shell script that creates symlinks (or creates folders with symlinks inside).<p>Paths are hard-coded in the shell script, but that actually reduces my cognitive load.
I started using fossil for this very thing. I was using git, however I like that fossil allows you to put the repository where ever you want on the file system. I don't have to worry about alias's, using .gitignore, or setting it it up where it doesn't show untracked files.<p>As far as fossil is concerned, once you close the repo, it's out of site of mind. I still use git for most everything else. Only my dot files and my personal obsidian vaults are backed up to fossil.
I have to admit, sheepishly, that I use RCS for version controlling dot files and even files such as fstab and grub. I use it in Windows too.<p>Infrequently, even on binary files (smirk).<p>There, I have said it, and taken the load off my conscience...
There's also `homesick`[1], which is a Ruby dotfile manager. If you don't feel like managing a Ruby distro and want something more portable (and `homesick` looks to be a stale project anyway), you can use `homeshick`[2] which is a Bash port that's still being maintained. (I use `homeshick`)<p>The last time I dug into this, `homeshick` was had more features and fit my needs better than `stow`.<p>Alternatively, check out YADM[3], "Yet Another Dotfile Manager", which I'm probably switching to once I get some time.<p>[1] <a href="https://github.com/technicalpickles/homesick" rel="nofollow">https://github.com/technicalpickles/homesick</a><p>[2] <a href="https://github.com/andsens/homeshick" rel="nofollow">https://github.com/andsens/homeshick</a><p>[3] <a href="https://yadm.io/" rel="nofollow">https://yadm.io/</a>
I very much prefer this simple method:<p><a href="https://www.atlassian.com/git/tutorials/dotfiles" rel="nofollow">https://www.atlassian.com/git/tutorials/dotfiles</a><p>tl;dr: it puts the .git directory aside and lets you use it to store any files on your filesystem.<p>All the usual commands work, except you use something like `config` or `dofiles` instead of `git`:<p><pre><code> $ config add ~/.config
$ config commit -m initial\ commit
</code></pre>
It's pretty much the same as creating a git repository in /, but doesn't mess with your normal git usage (so if you run `git status` in `/home/foo/src/my-awesome-project` and git repository has not been created there yet, git will fail with "not a git repository" and won't show you the contents of your whole filesystem tree).
I've seen this post on hackernews a few times now (as dang diligently pointed out).<p>However, typically they don't mention that more recent versions of Stow actually have specific functionality for dotfiles, which is support for the `dot-` prefix.<p>Check the man page for your version of stow. If the string "dot-" doesn't appear anywhere, you have an old version of stow.<p>Also interesting to me was the fact that the `make` manual has information on how `stow` is actually one of the recommended workflows in makefiles (in the context of setting a DESTDIR); but I've never seen anyone actually do that in practice.
Shameless self-plug: I could never get along with storing the whole content of the dotfiles when I casually just added a few lines I cared about, so I developed my own tool called confible. You can specify to just append a few lines or add the whole config and it can run commands (e.g. installing the specific tool together with its config). You can find it at <a href="https://github.com/sj14/confible" rel="nofollow">https://github.com/sj14/confible</a>
It's 2022 and I still use this program since I read that article so many years ago.<p>It's handy but sometimes a bit of manual preparation must be done on a new clean machine. For example if you want to stow only some files under ~/.config/program/ and not the whole program/ directory, you must first run an mkdir and <i>then</i> run stow to put the appropriate symlinks in place.
(since no one has mentioned it yet). This project's name sounds a lot like GNUSTO,<p>a magic word used in the Infocom/Sorcerer games to record an incantation in your spell book.<p><a href="https://en.wikipedia.org/wiki/Sorcerer_(video_game)" rel="nofollow">https://en.wikipedia.org/wiki/Sorcerer_(video_game)</a>
It feels unsafe to store dot files in source control as the article mentions. Is this a common practice? They could contain sensitive information and I fear people might be tempted to push to GitHub.<p>What about storing such files in a password manager/database?
Track you ~/.config (or whatever your XDG_CONFIG_HOME is) directory in git, and create symlinks for those programs that don't look there, optionally by script. Many programs already use that directory to store their configs. The Arch Linux folks are nagging every upstream into supporting it[1]. Also it requires no extra dependency aside git.<p>I think i say this everytime a dotfiles manager comes up.<p>[1] <a href="https://wiki.archlinux.org/title/XDG_Base_Directory" rel="nofollow">https://wiki.archlinux.org/title/XDG_Base_Directory</a>
After trying a bunch of tools I settled on git-tracking $HOME with '*' on my .gitignore (ignores everything, you have to add new files by --force). Is this better? symlinks seem like a smell.
I use my own tool for this: <a href="https://github.com/AndrewVos/pj" rel="nofollow">https://github.com/AndrewVos/pj</a>
I wound up writing my own stow replacement in Ruby, that moved the files rather than symlinked them. It does pattern-match the filenames with a list, anything on the list gets symlinked. It can also copy home-rolled binaries into /usr/local/bin. I suppose I could use both stow and etckeeper but a simple script can keep everything synced to my precise liking.