forked from ekstep/EkStep-Developer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue ekstep/Daily-Report-from-GIT#2 feat:Adding commit message hooks
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |