Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to stop tracking JetBrains .idea files

I have added the .idea files to my .gitignore file and that seems to work fine. Since my .idea files were tracked already, though, earlier posts have suggested the following code, to get them out from under version control.

git rm -rf .idea

or

git rm -r --cached .idea

In either case, though, I get the message:

fatal: pathspec '.idea' did not match any files.

When I list my files in this folder, though, .idea is right up top.

What am I doing wrong?

like image 342
Mike McGuire Avatar asked Oct 17 '22 20:10

Mike McGuire


1 Answers

fatal: pathspec '.idea' did not match any files.

assuming there would be no file with the name .idea on the path

Since you are trying to remove the entire folder change your command

git rm -r --cached .idea

to

git rm -r --cached .idea/
like image 143
Naman Avatar answered Oct 21 '22 06:10

Naman