我在git 1.8.3.1的Centos 7.5.1804上遇到了奇怪的情况。我有.gitignore
作为
*.pyc
但git status
显示以下
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# a.pyc
# b.pyc
# c.pyc
# d.pyc
而且,这些文件从未提交过。所以git status应该不会显示这些文件。什么会导致这种情况发生?
这是由于.gitignore文件中的拼写错误,该字符后面有多余的空间*.pyc
。但是,此行为Ubuntu 16.04.5
与git 2.7.
4有所不同,在4中,即使有额外的空间,文件也未列出。
这个空间问题可能已在git 1.8.3.1
和之间处理过2.7.4
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句