简体   繁体   English

向.gitignore添加了文件(不要忽略),但是git status看不到它

[英]Added file to .gitignore (to not ignore) but git status doesn't see it

For my project I'm using by .gitignore as a 'don't ignore' file by telling it to ignore everything in the first few lines then giving it a list of file to include with the ! 对于我的项目,我正在通过.gitignore用作“不要忽略”文件,方法是告诉它忽略前几行中的所有内容,然后为其提供文件列表,以将其包括在其中! character. 字符。 I added a file to my list and copied the file to my working directory and did a "git status" but it's not showing my new file as something to be added. 我将文件添加到列表中,并将该文件复制到我的工作目录中,并执行“ git status”,但未将新文件显示为要添加的内容。 Even "git status -u" doesn't show anything but says my working directory is clean. 甚至“ git status -u”什么也没有显示,但是说我的工作目录很干净。

This is on a Raspberry Pi with Debian Wheezy and git version 1.7.10.4, which should be the latest version for Wheezy. 这是在具有Debian Wheezy和git版本1.7.10.4的Raspberry Pi上,这应该是Wheezy的最新版本。 I can do a build of git from the source if that is the fix. 如果可以的话,我可以从源代码构建git。

只需将其从.gitignore中删除,您将看到它,如果您要提交它,则没有必要将其放在那里。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM