Reputation: 1407
I was using GitHub for more than a year, but right now I cannot handle ignoring files.
I’m trying to ignore files that are generated by my IDE, and also ignore .pyc files. But they keep appearing in my changes. I already tried to put:
experience/.idea
experience/.idea/*
Take a look at this screenshot:
Upvotes: 0
Views: 48
Reputation: 5671
If a file is already under version control, adding it to the .gitignore
won't remove it from the index.
You need to remove it yourself using git rm --cached <files>
Upvotes: 1
Reputation: 106389
There are two parts to this:
Be sure that you're using the right directory matching scheme, since you want to just block the directory. For that, you want to change experience/.idea/**
to just experience/.idea/
.
Be sure that Git isn't tracking any of those files anymore by removing them from the stage via git rm --cached <paths-to-ignore>
.
Upvotes: 1