gpt4 book ai didi

git - 如何摆脱 Git 子模块的未跟踪状态?

转载 作者:IT王子 更新时间:2023-10-29 01:19:28 25 4
gpt4 key购买 nike

我似乎无法摆脱 Git 子模块中未跟踪的内容。运行 git status 产生:

# 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 参数 stash 这些消息;但我想知道是否有办法以更合适的、核心化的方式清除这些污垢。

最佳答案

我找到了这个 blog post整体工作。通过将 ignore = dirty 选项添加到 .gitmodules 文件中的每个条目。

[submodule "zen-coding-gedit3"]
path = zen-coding-gedit3
url = git://github.com/leafac/zen-coding-gedit3.git
ignore = dirty

关于git - 如何摆脱 Git 子模块的未跟踪状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5126765/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com