5

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?

Naman
  • 27,789
  • 26
  • 218
  • 353
Mike McGuire
  • 329
  • 3
  • 12
  • The second example looks like what you want to do. Perhaps you could try `git rm -r --cached .idea/` to indicate that you're removing a directory. – byxor Dec 16 '16 at 19:50

1 Answers1

4

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/
Naman
  • 27,789
  • 26
  • 218
  • 353
  • The the folder probably is not in the directory you are running the command from or is already not being tracked. you can go ahead and push you changes to remote and verify if that reflects.(removes the .idea folder) – Naman Dec 18 '16 at 01:50