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
#!/bin/sh | |
#ブランチ名を取得 | |
Branch="$(git rev-parse --abbrev-ref HEAD)" | |
#コミットメッセージの最初にブランチ名を追加 | |
mv $1 $1.tmpbycommit-msg | |
echo -n "[$Branch] " > $1 | |
cat $1.tmpbycommit-msg >> $1 |
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
#!/usr/bin/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* original -> https://gist.github.com/mardix/3623562 | |
*/ | |
/** | |
* collect all files which have been added, copied or | |
* modified and store them in an array called output |
NewerOlder