gitignore cache confusion


I have some files in my ionic/angular project that were covered by my .gitignore file but somehow got into git.. They are .js and files that the project explorer shows under the .ts file (correctly).  I have a project-level .gitignore /*.js and / statements, but as I said a few .js and files are in git. Some searching indicates I should remove them from git, clean the cache, and then commit again.  Is that correct, can I do this in the ide?  Thanks


To stop tracking a file in git, you need to remove it with the git rm --cached command.

At the moment it is not possible to commit such change via IDEA, so please do this on the command line. Make sure to commit from the command line as well.

See and actually


Thanks Dmitriy. In may case, the wildcard expression I was using was incorrect. I had entered /src/*.js, and needed /scr/**/*.js

So it wasnt a plugin or cache issue after all.


Thanks for the update, glad you found the root cause.


Please sign in to leave a comment.