告诉git忽略子模块中未跟踪的内容?

时间:2015-11-27 00:04:24

标签: git git-submodules gitignore

目前,如果我运行git status,我会得到一堆这样的东西:

On branch master
Your branch is up-to-date with 'origin/master'.
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:   projects/submodule1 (untracked content)
        modified:   projects/submod2 (untracked content)
        modified:   projects/submodule3 (new commits, modified content, untracked content)
        modified:   projects/submodule4 (modified content, untracked content)
        ...

关心new commitsmodified content,但是很多这些子模块会生成自己的垃圾(比如构建文件等),而且我不会# 39;关心其中任何一个(如果它很重要,我应该将它添加到子模块并跟踪它)。有没有办法让git忽略子模块中的untracked content,而不是new commitsmodified content

0 个答案:

没有答案