我似乎无法摆脱 Git 子模块中未跟踪的内容。跑步git status
yields:
# On branch master
# Changes not staged for commit:
# (use "git add ..." to update what will be committed)
# (use "git checkout -- ..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: bundle/snipmate (untracked content)
# modified: bundle/surround (untracked content)
# modified: bundle/trailing-whitespace (untracked content)
# modified: bundle/zencoding (untracked content)
#
no changes added to commit (use "git add" and/or "git commit -a")
添加--ignore-submodules
参数隐藏这些消息;但我想知道是否有一种方法可以以更合适、更核心的方式去除这些污垢。
我找到了这个博客文章 https://web.archive.org/web/20200808000111/http://www.nils-haldenwang.de/frameworks-and-tools/git/how-to-ignore-changes-in-git-submodules全面开展工作。通过添加ignore = dirty
选项中的每个条目.gitmodules
file.
[submodule "zen-coding-gedit3"]
path = zen-coding-gedit3
url = git://github.com/leafac/zen-coding-gedit3.git
ignore = dirty
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)