Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not a lot of effort to add it to a new machine. It goes something like:

  git clone --bare https://example.com/myconfig.git $HOME/.myconfig
  echo "alias myconfig='git --git-dir=$HOME/.myconfig/ --work-tree=$HOME'" >> $HOME/.bashrc
  source $HOME/.bashrc
  myconfig checkout

...and it's done. Getting stow on a machine that doesn't have it is probably more work.


I can definitely attest that this is very easy, and best of all it's just a git repo, so there's no special tooling required. The process was seamless when I upgraded my MacBook.

With that said, i did forget the commands, and had to lookup the article. I knew how it worked, a sort of redirected git repo usable from anywhere, and used with an alternate command, but I just didn't remember the commands offhand.

The nice thing is too, is that the initial setup of things like the "myconfig" command (I use `dot`) only requires being setup once, even after switching machines. Since a new machine just requires you to setup the git repo with a couple (hard to remember lol) commands, and then suddenly your `dot` command works "magically". Because of course, it's included in your dot files.

It really is magical, and shockingly simple. I've been using it for over a year now and am fully happy.


Not really. It's two commands on Linux, three on a mac. Or one, if you just put them in a script in the repo (which is how I do it, with a few extra lines to detect my environment and use the proper install option).

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    brew install stow
    stow *
or

    apt-get install stow
    stow -v *


I think having to have that special git alias just bugs me as being a bit unnecessarily complex, but different strokes for different folks I suppose.

FWIW I don't actually use stow, I just wrote a simple Python script to do it[0]. It doesn't handle deleting things but it just means I don't have to mess about having a special non-standard git repo in $HOME, I can just treat my dotfiles like any other git project I have.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: