We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f49103f + cf0776f commit 7c6e504Copy full SHA for 7c6e504
.githooks/commit-msg
@@ -0,0 +1,9 @@
1
+REG='^.trello\.com\/c\/[a-zA-Z0-9]+.*$'
2
+BRANCH=$(git symbolic-ref --short HEAD)
3
+COMMIT_MSG=`head -n1 $1`
4
+
5
+if [[ ! $COMMIT_MSG =~ $REG ]]; then
6
+ cat $1
7
+ > .git/COMMIT_EDITMSG
8
+ echo "[$BRANCH] $COMMIT_MSG" >> .git/COMMIT_EDITMSG
9
+fi
scripts/init_hooks.sh
@@ -0,0 +1 @@
+cp -R ./.githooks/commit-msg ./.git/hooks
0 commit comments