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

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


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.