Friday, July 4, 2014

Storing dotfiles in Git: symlink + worktree

I use 3 tricks:

  1. core.worktree = /Users/cdunn
  2. symlink .git -> dotfiles/.git/
  3. In .gitignore: *

The beauty of my approach compared to many others is that regular git commands work directly in my home-directory. It's easier to explain with an example:
To add new ones, pass the '-f' flag to 'git add'.