.git';不要忽略未跟踪的文件
我想忽略下面显示的未跟踪文件,但它一直显示。 我尝试删除缓存文件(.git';不要忽略未跟踪的文件,git,gitignore,Git,Gitignore,我想忽略下面显示的未跟踪文件,但它一直显示。 我尝试删除缓存文件(git rm--cached CruiserConsole*.),但没有成功 D:\Git\CruiseProtocolScripts [master +8 ~1 -0 !]> git status # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # #
git rm--cached CruiserConsole*.
),但没有成功
D:\Git\CruiseProtocolScripts [master +8 ~1 -0 !]> git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# CruiserConsole.exe
# CruiserConsole.exe.config
# CruiserConsole.pdb
# CruiserConsole.vshost.exe
# CruiserConsole.vshost.exe.config
# CruiserConsole.vshost.exe.manifest
# LuaInterface.dll
# lua51.dll
nothing added to commit but untracked files present (use "git add" to track)
D:\Git\CruiseProtocolScripts [master +8 ~0 -0 !]> git rm --cached .\CruiserConsole.*
fatal: pathspec 'CruiserConsole.*' did not match any files
我想我对文件名有不正确的模式匹配,但我不能指出确切的问题是什么
提前谢谢。您需要删除每行开头的
/
。您的.gitignore
应该如下所示:
CruiserConsole*.*
*.dll
如果我没记错的话,Windows上的路径斜杠是另一种方式。尝试将这些“/”更改为“\”或“\\”我尝试了与您相同的文件名和.gitignore。在我的Linux上工作。@KamilDomański我忘了提到我使用的是Windows和powershell。谢谢你的评论!谢谢你的建议,但是我想忽略根目录中的文件,所以我需要
/
在这里。谢谢你的建议。我试过了,但什么也没变。
CruiserConsole*.*
*.dll