Skip to content

Instantly share code, notes, and snippets.

@derwolfe
Forked from linssen/post-checkout
Created July 18, 2013 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derwolfe/6026198 to your computer and use it in GitHub Desktop.
Save derwolfe/6026198 to your computer and use it in GitHub Desktop.
#! /bin/sh
# Start from the repository root.
cd ./$(git rev-parse --show-cdup)
# Delete .pyc files and empty directories.
echo "Deleting pyc files."
find . -name "*.pyc" -delete
find . -type d -empty -delete
@derwolfe
Copy link
Author

Add this to the .git/hooks/post-commit file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment