Live data from Hacker News

Using GNU Stow to manage your dotfiles

brandon.invergo.net

21–30 of 73 posts

Re: Using GNU Stow to manage your dotfiles

#21
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.

Re: Using GNU Stow to manage your dotfiles

#22
post #9
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.

I also keep my whole homedir in git, and it's great. My approach isn't to .gitignore, because I want to ignore almost everything -- I just add and commit things when I want to track them. One of my many git aliases[1] is 'git sn' for showing status without untracked files; this helps when dealing with my homedir: status --short --branch --untracked=no [1] https://github.com/cespare/dotfiles/blob/master/.gitconfig#L..…

I have my homedir in git too and also ignore just about everything. I ended up using gitignore as a whitelist instead of a blacklist, e.g.:

    /*
    !/.gitignore
    !/.gitmodules
    !/.gitconfig
    !/.zshrc
    !/.zshenv
    !/.zsh
    !/.tmux.conf
    !/.vimrc
    !/.vim

Re: Using GNU Stow to manage your dotfiles

#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.

Re: Using GNU Stow to manage your dotfiles

#25

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

Oooh... submodules. Yours is better than mine. Maybe it's time I ditched my own half-baked setup...

Re: Using GNU Stow to manage your dotfiles

#27
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 learn git, check out Scott Chacon's excellent Pro Git, available for free online at: http://www.git-scm.com/book

Post reply on HN