Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between "py[cod]" and "pyc" in .gitignore notation? [duplicate]

Tags:

What is the difference (if any) between ".pyc" and ".py[cod]" notation in ignoring files. I am noticing I have both on my git ignore file. Thanks

like image 965
BluePython Avatar asked Sep 10 '13 22:09

BluePython


1 Answers

You are safe to remove the .pyc entry from your .gitignore, since .py[cod] will cover it. The square brackets are for matching any one of the characters, so it matches .pyc, .pyo and .pyd.

Since they are all generated from the .py source, they should not be stored in source control.

like image 106
Ted Percival Avatar answered Oct 10 '22 13:10

Ted Percival