.gitignore not ignoring .idea path

add .idea/ to .gitignore file

run this commands in terminal to complete mission :)

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

.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

To remove the "fatal: pathspec '.idea' did not match any files" just use if the dir still returns as untracked:

git clean -f -d .idea

Tags:

Git

Gitignore