Live data from Hacker News

Using GNU Stow to manage your dotfiles

brandon.invergo.net

31–40 of 73 posts

Re: Using GNU Stow to manage your dotfiles

#31
post #2

but many/most dotfiles reside at the top-level of your home directory, where it wouldn't be a good idea to initialize a VCS repository I totally disagree. I love having much of my home directory in git. I have a .gitiignore for the stuff I don't want in there, but the rest. Ahhhhh, so nice to be able to clone somewhere else and use.

My main problem with this is it leads to accidentally executing git commands on your dotfiles repo. Like, say you thought ~/src/xulrunner was a git repo, but it was actually managed with hg or maybe was extracted from a tarball. Whereas normally executing some git command would complain that this is not a repo, if your ~ is a git repo then git will happily execute whatever you told it to on your dotfiles repo.

For git repositories that are not touched very often, you can move the .git directory to something that isn't picket up automatically. Use it like this:

    mv .git dot_git
    git --git-dir="dot_git" add ...
Thats also a nice trick if you need a git repos in a git repos, e.g. for integration test for libraries interacting with git.

Re: Using GNU Stow to manage your dotfiles

#32
post #26

Does anyone else use RCS [1] for this? [1] https://www.gnu.org/software/rcs/

WAT. Are you trolling us, or are you that uninformed about VCS history? Giving you the benefit of the doubt, just learn and use git[1]. Yes, there are things about the UI that suck. But the underlying machinery and power it provides is unparalleled. RCS, in short, is that horrible feet-killing pair of boots that made you think you hated , when in fact it was just frustration with sub-par equipment. [1] If you need to…

rcs doesn't have .gitignore files and accidentally running commands on your top-level repo, so I could see why one would consider it. You don't really need atomic commits for this use case, so rcs is barely worse than the alternatives.

Re: Using GNU Stow to manage your dotfiles

#33
post #26

Does anyone else use RCS [1] for this? [1] https://www.gnu.org/software/rcs/

WAT. Are you trolling us, or are you that uninformed about VCS history? Giving you the benefit of the doubt, just learn and use git[1]. Yes, there are things about the UI that suck. But the underlying machinery and power it provides is unparalleled. RCS, in short, is that horrible feet-killing pair of boots that made you think you hated , when in fact it was just frustration with sub-par equipment. [1] If you need to…

Ha! Fair enough. No, I didn't intend to troll. I've found RCS useful for ad hoc versioning of configuration files on systems without git or other version control systems. Wondering whether anyone still finds it useful. I reckon not!

Re: Using GNU Stow to manage your dotfiles

#34
post #24
post #20

The primary complaint of the article is tools that manage the files in git and symlink things into place have lots of dependencies. ghar, a project I wrote, is a single standalone python file: https://github.com/philips/ghar

Python is still a pretty large dependency in itself.

Not really. I've yet to see a distro in the past 10 years without it.

Re: Using GNU Stow to manage your dotfiles

#35
I've taken a different approach and store all my dotfiles on Dropbox and then symlinked them the local system. I get synchronisation between machine almost instantaneously and can move between around half a dozen boxes Including Linux, OSX and cygwin with little problem. Dropbox provide some version control which is useful If I really break something and I have a single script which can bootstrap a new machine. A few things don't liked to be symlinked (namely ssh keys) but other than that this had worked great for several years.

Re: Using GNU Stow to manage your dotfiles

#38

I did not know about GNU Stow. I want to try to use this for my dotfiles along with a simple Makefile to automate calling stow on all of the directories. This will also be a nice way to manage the differences between my home configuration and work configuration. One make rule per environment. Thanks for sharing.

You might also enjoy xstow, a reimplementation in c++ -- in case you might want to use stow without having perl:

http://xstow.sourceforge.net/

edit: I use xstow for managing ~/opt -- putting stuff like ~/opt/xstow/golang-git, with symlinks to  ~/opt/{bin,lib,man} -- making it easy to add the relevant folders to PATH, MANPATH etc in .bashrc.

Re: Using GNU Stow to manage your dotfiles

#39
post #33

Earlier quoted context omitted.

WAT. Are you trolling us, or are you that uninformed about VCS history? Giving you the benefit of the doubt, just learn and use git[1]. Yes, there are things about the UI that suck. But the underlying machinery and power it provides is unparalleled. RCS, in short, is that horrible feet-killing pair of boots that made you think you hated , when in fact it was just frustration with sub-par equipment. [1] If you need to…

Ha! Fair enough. No, I didn't intend to troll. I've found RCS useful for ad hoc versioning of configuration files on systems without git or other version control systems. Wondering whether anyone still finds it useful. I reckon not!

I used to use RCS, but these days I use mercurial. Pretty much any DVCS is going to be a "better RCS" than RCS (bzr, mercurial, git, fossil, monotone...). Even if you never need to pull/push.

Re: Using GNU Stow to manage your dotfiles

#40

I've made my own similar solution. I have all mine on Github, so I git clone the repo, and run my bootstrap script, which initializes the submodules, Vundle's all my vim plugins, and symlinks all the files. https://github.com/Aaronneyer/dotfiles

isn't that sort of info kinda sensitive https://github.com/Aaronneyer/dotfiles/blob/master/sshconfig ? I can see hosts and usernames...
Post reply on HN