[英].gitignore and untracked files are shown in git status
我在使用 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
之后有額外的空間。 但是,使用git 2.7.
Ubuntu 16.04.5
上的行為有所不同git 2.7.
4 即使有額外的空間,也沒有列出文件。
可能在git 1.8.3.1
和2.7.4
之間已經解決了這個空間問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.