I have ran the following in cmd
git rm -r --cached .
to remove any files that have been committed and shouldn't have. I then added this to my .gitignore file:
settings_local.py
*.pyc
which should ignore any .pyc files and the local settings file. However, when I try and scan for changed files in git, it finds them!
Anything already committed will still be recognized by git even if they would be otherwise ignored by the .gitignore
. Once you have run git rm --cached
, you still have to commit the deletion of those files. They should be ignored from then on, unless you forcibly re-add them.