.gitignore not ignoring .idea path

Solution 1:

.gitignore only ignores newly added (untracked) files.

If you have files that have already been added to the repository, all their changes will be tracked as usual, even if they are matched by .gitignore rules.

To remove that folder from the repository (without deleting it from disk), do:

git rm --cached -r .idea

Solution 2:

add .idea/ to .gitignore file

run this commands in terminal to complete mission :)

git rm -rf .idea
git commit -m "delete .idea"
git push