Skip to content

Instantly share code, notes, and snippets.

@icaoberg
Created March 6, 2013 21:32
Show Gist options
  • Save icaoberg/5103280 to your computer and use it in GitHub Desktop.
Save icaoberg/5103280 to your computer and use it in GitHub Desktop.
[Git] Remove all *.pyc files from your git repository
#!/bin/bash
find . -name "*.pyc" -exec git rm {} \;
git commit -m "Removed compiled python files in distribution left after last commit"
@mautematico
Copy link

Do not forget to add an entry to .gitignore ;)

@davidsomnus
Copy link

@icaoberg
Copy link
Author

@mautematico and @davidsomnus thanks for the feedback. However, this snippet was meant to highlight a situation a person was having. 😃

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