Skip to content

Commit

Permalink
Add .git.templates
Browse files Browse the repository at this point in the history
  • Loading branch information
n0ts committed Dec 28, 2015
1 parent 16e6b8c commit 44ad6c2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ DOTS=\
.emacs \
.emacs.d \
.my.cnf \
.git.templates \
.gitattributes.local \
.gitconfig.local \
.gitignore.local \
Expand Down
2 changes: 2 additions & 0 deletions dot.git.templates/hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
git secrets --commit_msg_hook -- "$@"
12 changes: 12 additions & 0 deletions dot.git.templates/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

if [ -z "`git config --local user.name`" ]; then
echo "fatal: user.name is not set locally"
exit 1
fi
if [ -z "`git config --local user.email`" ]; then
echo "fatal: user.email is not set locally"
exit 1
fi

git secrets --pre_commit_hook -- "$@"
2 changes: 2 additions & 0 deletions dot.git.templates/hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
git secrets --prepare_commit_msg_hook -- "$@"

0 comments on commit 44ad6c2

Please sign in to comment.