- 
      
 - 
        
Save rob-b/3273216 to your computer and use it in GitHub Desktop.  
    place in .git/hooks/post-checkout to delete empty directories and pyc files
  
        
  
    
      This file contains hidden or 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 | |
| echo "Purging pyc files and empty directories..." | |
| # Start from the repository root. | |
| cd ./$(git rev-parse --show-cdup) | |
| # Delete .pyc files and empty directories. | |
| find . -name "*.pyc" -delete > /dev/null 2>&1 & | |
| find . -type d -empty -delete > /dev/null 2>&1 & | 
      
      
  Author
  
  
      
          
      
      
            rob-b
  
      
      
      commented 
        Feb 24, 2014 
      
    
  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment