1

My gitignore has the following lines

__init__.cpython-36.pyc
functions.cpython-36.pyc
.DS_Store
__pycache__
*.pyc

But my git client is still registering changes to the pyc files

enter image description here

After reading online I just don't understand what my problem is. Any ideas? Let me know if I need to provide more information. Thanks

Josh Flori
  • 104
  • 11
  • Possible duplicate of [How to make Git "forget" about a file that was tracked but is now in .gitignore?](https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore) – phd Jun 21 '19 at 14:47

1 Answers1

0

This file was already tracked before you created .gitignore. In that case you need to untrack it:

git rm --cached ...

From man git-rm:

--cached

       Use this option to unstage and remove paths only from the
       index. Working tree files, whether modified or not, will be
       left alone.
Arkadiusz Drabczyk
  • 11,227
  • 2
  • 25
  • 38