怎麼忽略git submodules裡的更改

VitoLI發表於2018-10-10

總結就是修改.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).

來自: www.nils-haldenwang.de/frameworks-…

相關文章