files still being tracked after added to .gitignore

Answered

I typically clone a new project and then start coding.  I will create a new directory that I dont want to include in the repo.  Afterwards before I commit the changes I add the directory to the .gitignore file.  The problem is that when I attempt to commit, those files are being tracked.  I know I can do a git remove the cache and readd the files (which I do), but I sometimes need to do this frequently.  Is there a way to have pycharm scan the .gitignore file and remove them from git before they are being tracked?

0
1 comment

Hello Mrjoli021

Could you please check File | Settings | Version Control | Confirmation -> "When files are created" is it set to "add silently"?
Perhaps you create a folder, then you create a file, IDE adds it to Git, and then you add a folder to .gitignore and this is a reason why you face such behavior.

0

Please sign in to leave a comment.