2
我已经定义的库文件中的以下.gitignore
:gitignore不会忽略
/aclocal.m4
/config.guess
/config.sub
重新配置后然而,重建,git status
还报道:
# On branch master
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: aclocal.m4
# modified: config.guess
# modified: config.sub
...
我期待它说些什么像:
# deleted: aclocal.m4
...
我在做什么错在这里?
您之前正在跟踪这些文件吗? –
已经在git中的文件优先于.gitignore定义。 gitignore只会阻止新文件进入git领域,而不会从中删除现有的文件。这让你无法控制,你不希望仓库由于gitignore文件中的错误而被自动清理干净。 – Newtopian