Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move git hooks into templates

Apply hooks by default, in more circumstances.  (Should be picked up by
by "git init" and "git clone".)  Might be better if .git/hooks was
instead symlinked to the templates/hooks directory...
  • Loading branch information...
commit 8b0a5c6ad59ff752af2d54b59c193200cc8f0df5 1 parent e39085e
@ithinkihaveacat authored
3  home/.gitconfig
@@ -51,3 +51,6 @@
preCommitRegexp = rawlog|console\\.log
+ templatedir = ~/.config/templates
7 templates/hooks/
@@ -0,0 +1,7 @@
+The contents of this directory probably come from:
+ $ git config --global init.templatedir
+The default hooks directory location (which contains some sample
+hooks) is `/usr/share/git-core/templates`. (May be different if using
+`brew` or similar.)
5 hooks/pre-commit → templates/hooks/pre-commit
@@ -1,5 +1,10 @@
+# Install by copying into .git/hooks/pre-commit, or permanently
+# (affects init and clone) via:
+# $ git config --global init.templatedir '~/.config/templates'
# Configure via something like:
# $ git config --global hooks.preCommitRegexp 'var_dump|console\.log'
Please sign in to comment.
Something went wrong with that request. Please try again.