Skip to content

Commit

Permalink
Issue ekstep/Daily-Report-from-GIT#2 feat:Adding commit message hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mamthak committed Jan 17, 2017
1 parent daac27f commit 6722458
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions setup-hooks.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off

echo Copy hooks to .git repo
IF EXIST "hooks\" (
call git subtree pull --prefix=hooks\ --squash hooks master
) ELSE (
call git remote add hooks https://github.com/ekstep/GitHooks.git
call git subtree add --prefix=hooks\ --squash hooks master
)
xcopy "hooks\prepare-commit-msg" ".git\hooks\" /y
14 changes: 14 additions & 0 deletions setup-hooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
# This script is for setting up git hooks

#Copies the hooks to the .git directory

if [ ! -d "hooks" ]; then
git remote add hooks https://github.com/ekstep/GitHooks.git
git subtree add --prefix=hooks/ --squash hooks master
else
git subtree pull --prefix=hooks/ --squash hooks master
fi
cp hooks/prepare-commit-msg .git/hooks/prepare-commit-msg

exit 1;

0 comments on commit 6722458

Please sign in to comment.