简体   繁体   中英

Git doesnt ignore some of the files

I know that problem seems to be asked many times, but I have no clue that do.

.gitignore contains .csv , but then I tried to commit, faced really strange behavior for me:

Changes to be committed:

#   new file:   regression/qw/batch_learning.ipynb
#   new file:   regression/qw/submission.csv
#   new file:   regression/qw/test.csv
#
# Untracked files:
#   cm0xg0y1.s2t.txt
#   regression/qw/train.csv
#   text analyses/submission.csv
#

As you can see some files ignored, some not. I know problem might be related, that git "saw" that files, but if so, train.csv wont be ignored. So can I ignore that files?

.gitignore file should contain *.csv

[edit] This is explained in man page, of course - but you need to know what globbing means first ;)

man gitignore says:

(...) Otherwise, Git treats the pattern as a shell glob suitable for consumption by fnmatch(3) (...)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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