我使用的是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 rm --cached .idea/从git索引中删除它时,我得到了错误
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\'我做错什么了?
发布于 2014-08-04 16:09:29
.idea还没有被git跟踪。您不能从存储库中删除它。您可能想要做的是将它排除在文件的git之外。
https://stackoverflow.com/questions/25122826
复制相似问题