开发者

git status shows a file that I have listed explicitly in my .gitignore file

开发者 https://www.devze.com 2022-12-31 05:16 出处:网络
I have the following line in my .gitignore file: var/www/docs/.backroom/billing_info/inv.pl but when I type \'git status\' I am told the following:

I have the following line in my .gitignore file:

var/www/docs/.backroom/billing_info/inv.pl

but when I type 'git status' I am told the following:

#   modified:   var/www/docs/.backroom/billing_info/inv.pl

I dont un开发者_Python百科derstand how a file which is explicitly listed as an ignore pattern could be listed as modified when I want git to ignore it.

There are no lines starting with a ! in my .gitignore file

Here is my entire .gitignore file for reference: http://pastebin.com/Jw445Qd7


That should only happen if inv.pl is already tracked (see gitignore man page).

Try (with git rm) a:

git rm --cached var/www/docs/.backroom/billing_info/inv.pl

If the file is already committed, see this SO answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号