Skip to content

Instantly share code, notes, and snippets.

@dragonfax
Last active December 18, 2015 21:29
Show Gist options
  • Save dragonfax/5847823 to your computer and use it in GitHub Desktop.
Save dragonfax/5847823 to your computer and use it in GitHub Desktop.
make pre-commit a global default for all of your repos.
mkdir ~/.git_template
mkdir ~/.git_template/hooks
cp $(gem contents pre-commit | grep pre-commit-hook) ~/.git_template/hooks/pre-commit
git config --global init.templatedir '~/.git_template'
# also, to implement in any pre-existing repos, just execute 'git init' in them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment