.gitignore被Git忽略

问题:

My .gitignore file seems to be being ignored by Git - could the .gitignore file be corrupt? 我的.gitignore文件似乎已被Git忽略.gitignore文件是否已损坏? Which file format, locale or culture does Git expect? Git需要哪种文件格式,语言环境或文化?

My .gitignore : 我的.gitignore :

# This is a comment
debug.log
nbproject/

Output from git status : 从git status输出:

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       debug.log
#       nbproject/
nothing added to commit but untracked files present (use "git add" to track)

I would like debug.log and nbproject/ not to appear in the untracked files list. 我希望debug.log和nbproject/不会出现在未跟踪的文件列表中。

Where should I start looking to fix this? 我应该从哪里着手解决此问题?


解决方案:

参考一: https://stackoom.com/question/m34B/gitignore被Git忽略
参考二: https://oldbug.net/q/m34B/gitignore-is-ignored-by-Git

评论

暂无评论