Git似乎忽略了我的.gitignore文件-.gitignorefile是否已损坏?Git希望使用哪种文件格式、区域设置或文化?
我的.gitignore:
# This is a comment
debug.log
nbproject/
git状态的输出:
# 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)
我希望debug.log和nbproject/不出现在未跟踪的文件列表中。
我应该从哪里开始解决这个问题?
我遇到了这个问题,一个.gitignore文件包含以下行:
lib/ext/
我刚刚意识到,事实上,这个目录是指向其他文件夹的符号链接:
ls -la lib/ext/
lrwxr-xr-x 1 roipoussiere users 47 Feb 6 14:16 lib/ext -> /home/roipoussiere/real/path/to/the/lib
在lib/ext/行上,Git实际上查找一个文件夹,但符号链接是一个文件,因此我的lib文件夹不会被忽略。
我通过用.gitignore文件中的lib/ext替换lib/ext/来解决这个问题。
我遇到了这个问题,一个.gitignore文件包含以下行:
lib/ext/
我刚刚意识到,事实上,这个目录是指向其他文件夹的符号链接:
ls -la lib/ext/
lrwxr-xr-x 1 roipoussiere users 47 Feb 6 14:16 lib/ext -> /home/roipoussiere/real/path/to/the/lib
在lib/ext/行上,Git实际上查找一个文件夹,但符号链接是一个文件,因此我的lib文件夹不会被忽略。
我通过用.gitignore文件中的lib/ext替换lib/ext/来解决这个问题。