总结就是修改.gitmodules文件,加入ignore描述
ignore = dirty
eg:
[submodule "src/common"]
path = src/common
url = git@123.123.123.123:webapps/common.git
ignore = dirty
复制代码dirty
Using "dirty" ignores all changes to the work tree of submodules, only changes to the commits stored in the superproject are shown
untracked
When "untracked" is used submodules are not considered dirty when they only contain untracked content (but they are still scanned for modified content).
all
Using "all" hides all changes to submodules (and suppresses the output of submodule summaries when the config option status.submodulesummary is set).