Iv'e added:
*.iml
to all of the gitignore files in my project. They are still being tracked, even after committing the .gitignore.
Iv'e added:
*.iml
to all of the gitignore files in my project. They are still being tracked, even after committing the .gitignore.
The safe option is to remove the iml file from your staging index.
git rm --cached <path to iml file>
git will track the files sometimes even if you added the file which shouldn't be tracked in .gitignore
In that case you should remove the cache first then add all.
Important : Before, commit or stash your current changes
$ git rm -r --cached .
$ git add .
$ git commit -m "file tracking - changed"
When you added them one time, they will keep tracked!
You have to retrieve all commits till the one where you commited the .iml files.
Here is a good post on SF about reseting commits in git: How to revert Git repository to a previous commit?