我已经看过很多关于此的帖子,但没有我尝试过的解决方案。在git中忽略目录的问题
我有一个目录结构如下
MySite\Bin
MySite\Obj
MySite\Important
我的.gitignore文件,该文件是在根(是的,我已经试图消除*也)
MySite\bin\*
MySite\obj\*
执行命令git状态显示这
# modified: .gitignore
# modified: SomeOtherFile.fle
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# MySite/bin/
# MySite/obj/
我试过执行以下命令
git rm -r MySite\bin
git rm -r --cached MySite\bin
git rm MySite\bin\fileToIgnore.dll
git rm --cached MySite\bin\fileToIgnore.dll
而且我不断收到此错误 致命:pathspec 'mysite的/ bin' 的不匹配任何文件
当执行git的补充。中的文件MySite \ Bin和将MySite \ obj添加到分段项目中。为什么?
我也使用Windows版本的git(mysysgit)。
非常感谢!
谢谢。我的.gitignore文件需要正斜杠。 – 2011-03-21 01:18:30