Created
April 5, 2011 05:57
-
-
Save ento/903098 to your computer and use it in GitHub Desktop.
Steps to install pep8 pre-commit hook managed by git-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
# Repository developers | |
cd /path/to/somewhere | |
git clone https://github.com/kergoth/git-hooks | |
export PATH=/path/to/somewhere/git-hooks:$PATH | |
cd /path/to/project | |
git hooks --install |
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
# Repository owner | |
cd /path/to/project | |
mkdir -p git_hooks/pre-commit | |
curl -o git_hooks/pre-commit/check_pep8.py https://gist.github.com/raw/810399/7e5e122f3956c023afd68c6a1e0e177bfad11b9e/gistfile1.py | |
chmod a+x git_hooks/pre-commit/check_pep8.py | |
# check the hook is installed correctly | |
git hooks | |
# commit the hook | |
git add git_hooks/pre-commit/check_pep8.py | |
git commit -m "add pre-commit hook to check pep8" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment