我正在使用 PHPstorm,我想从 git 索引中删除隐藏文件夹 .idea。当我使用时,$git status
我得到了
C:\Program Files (x86)\Ampps\www\1stenglish IS [master +1 ~0 -0 !]> git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .idea/
nothing added to commit but untracked files present (use "git add" to track)
但是当我想用命令从 git index 中删除它时,git rm --cached .idea/
我得到了错误
fatal: pathspec '.idea' did not match any files
我尝试了不同的路径选项,但没有结果:
git rm --cached .idea
git rm --cached .idea/*
git rm --cached 'C:\Program Files (x86)\Ampps\www\1stenglish IS\.idea'
git rm --cached 'C:\Program Files (x86)\Ampps\www\1stenglish IS\.idea\'
我做错了什么?