git add对一个文件夹不起作用

时间:2016-09-17 13:57:16

标签: git

当我这样做时

git add .

我的存储库中的所有文件都处于跟踪状态,不包括一个名为java的文件夹,其中包含我的所有资源。 有例子:

git status

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        modified:   java/shadasviar (modified content, untracked content)

git add .
git status


Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        modified:   java/shadasviar (modified content, untracked content)

它可以是什么以及如何解决它?

1 个答案:

答案 0 :(得分:0)

从所有子目录中删除所有.git文件夹有帮助。