Git Submodule to a subfolder

后端 未结 3 501
青春惊慌失措
青春惊慌失措 2020-12-09 02:36

In svn you can link a repository to any folder in another svn repository. I\'m wondering if there is a similar feature for git? Basically I want a git submodule inside my

3条回答
  •  猫巷女王i
    2020-12-09 03:02

    Usually when you're trying to extract a subfolder of some other project, that subfolder should be a separate project in the first place, and both parent projects should be referring to it.

    You can extract such a subproject's history using a tool like git subtree. Then you can link the subtree back into your project using either git submodule or git subtree, whichever you prefer.

提交回复
热议问题