我能够将我的目录添加到 git 并执行 git commit 但奇怪的是,当我这样做的时候
$ git add .
我收到以下错误:
warning: LF will be replaced by CRLF in .idea/workspace.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in grails-app/controllers/com/abc/pqr/Rep
ortController.groovy.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in grails-app/domain/com/abc/pqr/Report.g
roovy.
The file will have its original line endings in your working directory.
fatal: unable to stat 'Dirname#com.abc.pqr.Report': No such file or directo
ry
我已经完成了这个SO 答案,如果我尝试:
$ git rm Dirname#com.abc.pqr.Report
我收到此错误:
fatal: pathspec 'Dirname#com.abc.pqr.Report' did not match any files
令人惊讶的是,在搜索上述目录时没有文件,我没有找到上述任何此类文件。
值得一提的是,根目录下有一个文件Dirname/#com.abc.pqr.Report(即根目录下Dirname下的文件#com.abc.pqr.Report)。奇怪的是,我无法删除,类似的问题(我使用的是 windows-7 操作系统),我可以使用它来解决它。但是自从我(不小心通过错误的 grails 脚本)创建了上述文件以来,我有无法执行 `git add 。