Is there a way to `git submodule add` a repo *without* cloning it?

前端 未结 3 1706
说谎
说谎 2021-02-04 05:49

I have a very long list of repos that I\'m trying to make into one parent repo by making them all submodules.

I\'ve tried adding them to .gitmodules manual

3条回答
  •  太阳男子
    2021-02-04 06:48

    After a long walk on the internet, I found out that you can achieve what you want by writing directly in the git index and create the “gitlink” file type.

    git update-index [--add] --cacheinfo 160000  
    

    Also do not forget to write the subrepo in .gitmodules (declare the external path, mostly).

提交回复
热议问题