Skip to content

Instantly share code, notes, and snippets.

@Slowhand0309
Created October 24, 2015 08:33
Show Gist options
  • Save Slowhand0309/4f61dc65439c46d530f9 to your computer and use it in GitHub Desktop.
Save Slowhand0309/4f61dc65439c46d530f9 to your computer and use it in GitHub Desktop.
git-hooks msg at server side
# hook file of the echo target
* pre-receive
* update
* post-update
# script
echo "update >>" >> up.log
echo $# >> up.log
echo $@ >> up.log
echo "--------------" >> up.log
# output message
pre-receive >>
0
--------------
update >>
3
refs/heads/master 9848db4829aac05708fcdd369ced6e2e90647322 a3cea1587a51c59b48911c5fadc8e362f2bbaa19
--------------
post-receive >>
0
--------------
post-update >>
1
refs/heads/master
--------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment