What am I missing that needs to be done in order to get git
to ignore my .idea/
path?
ctote@ubuntu:~/dev/1$ git status
On branch master
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
For those of you getting fatal: pathspec '.idea' did not match any files
:
You just have to include the full path to the .idea folder.
So first, do a git status
, which should show you the path to .idea
given where you currently are.
Then, include the path in the command w0lf suggested: git rm --cached -r example/path/to/.idea
To Solve Error "fatal: pathspec '.idea' did not match any files" after entering above command,
git status
. It will list all the files as usual. Check the path of idea folder files. Mine was at ../.idea/workspace.xml
. Notice the ../.idea
git rm --cached -r ../.idea
rm '.idea/workspace.xml'
and the files will be removed.