Created
April 22, 2014 11:28
-
-
Save adamcharnock/11175057 to your computer and use it in GitHub Desktop.
.git/hooks/post-checkout
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/bash | |
echo "Cleaning up .pyc files and empty directories" | |
REPO_ROOT=./$(git rev-parse --show-cdup) | |
# Delete .pyc files and empty directories. | |
find $REPO_ROOT -name "*.pyc" -delete | |
find $REPO_ROOT -type d -empty -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure you do
chmod +x .git/hooks/post-checkout
once you have put it in place.