即使忽略它也会显示未跟踪的文件夹

时间:2012-11-16 17:39:29

标签: git

我正在使用git存储库跟踪我的主文件夹。在做git status后,我得到了这个:

# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   workspace/
no changes added to commit (use "git add" and/or "git commit -a")

为什么显示该行?这是我的.gitignore文件:

*
!*/
!.vim/plugin/*
!.vim/doc/*

我必须添加!*/来跟踪.vim/plugin内的更改,例如,我看到here

1 个答案:

答案 0 :(得分:2)

你忽略了第一行的所有内容:'*'。

然后你用第二行取消了目录:'!* /'。

Voila,你不是在忽视目录!

相关问题