git: create template dir with pre-commit hook

The hook prevents committing on a branch named "upstream," which I use to
track upstream changes.
zsh: fix 'gd' alias if $HOME contains a space
Move home gitdir to ~/dotfiles/gitdir.

This has several advantages:
- It's hidden.
- It's in a fixed location.
- It does not confuse me if I have a second "new-workdir" repo.