8000 added .pyc script · realpython/python-scripts@6b4c4ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b4c4ae

Browse files
committed
added .pyc script
1 parent 6cc74b9 commit 6b4c4ae

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.pyc
2+
.DS_Store

remove_all_pyc.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
I always forget this ...
2+
3+
To recursively remove all those pesky *.pyc* files from a git repo, run this command:
4+
5+
```bash
6+
$ find . -name "*.pyc" -exec git rm -f {} \;
7+
```
8+
9+
Then make sure to add a *.gitignore* and the root of the repo and add the line: `*.pyc`

0 commit comments

Comments
 (0)
0