I am trying to ignore all .pyc extensions in the repository my .gitignore file looks like this
.idea
*.rdb
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.pyc
__pycache__/
however when I do git status
. I get information on modified files like this
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: .DS_Store
modified: .gitignore
modified: Device/__init__.py
modified: Device/admin.py
modified: Device/apps.py
modified: Device/migrations/0001_initial.py
modified: Device/migrations/__init__.py
modified: Employee/__init__.py
modified: Employee/__pycache__/__init__.cpython-35.pyc
Notice the last file .pyc is shown as modified and also the foled pycache which is added to .gitignore also gets shown. How do I get git to ignore them ?