Created
December 22, 2015 16:26
-
-
Save hawkeyetwolf/70e3e816e66c05e98935 to your computer and use it in GitHub Desktop.
Install useful git pre-commit hooks
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
<?php | |
echo "Creating hooks directory.\n"; | |
mkdir('.git/hooks', 0775, true); | |
echo "Downloading pre-commit hook.\n"; | |
$fp = fopen('.git/hooks/pre-commit', 'w'); | |
$precommit = file_get_contents('http://gitscripts.s3.amazonaws.com/pre-commit'); | |
fwrite($fp, $precommit); | |
fclose($fp); | |
chmod('.git/hooks/pre-commit', 0775); | |
echo "Done.\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment