What is the advantage of using git submodules over having a repo inside another repo with a gitignore?

后端 未结 1 1778
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-16 17:52

We\'ve been looking into git submodules and we are wondering what advantage (if any) is there in having a repository using submodules verses having a repository within anoth

相关标签:
1条回答
  • 2020-12-16 18:13

    The git parent (of the submodules) will keep track of the branches and tag IDs of the submodules when you commit. That will ensure that when you check out the parent (at a known version) then the submodules will also contain their right tags.

    If, as above, it just happens to be an ignored subdirectory, then basically these are two independent git repos, as if they'd not been part of a file system hierarchy.

    0 讨论(0)
提交回复
热议问题