問題:
I can't seem to get rid of untracked content in Git's submodules.我似乎無法擺脫 Git 子模塊中未跟蹤的內容。 Running git status
yields:運行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")
Adding the --ignore-submodules
parameter hides these messages;添加--ignore-submodules
參數會隱藏這些消息; but I wonder if there's a way to get rid of this dirt in a more suitable, core-ish, manner.但我想知道是否有辦法以更合適的核心方式去除這些污垢。
解決方案:
參考一: https://en.stackoom.com/question/LVhl參考二: https://stackoom.com/question/LVhl