How to `git submodule add` Existing sub Repository?

后端 未结 5 1898
既然无缘
既然无缘 2021-01-18 02:56

The Question

How to add existing sub repository as a submodule in git?

The Why

I have a private codespace supermodule with submodule

5条回答
  •  迷失自我
    2021-01-18 03:33

    1. remove files from index foo/bar: git rm -f --cached foo/bar
    2. git submodule add https://github.com/octocat/Spoon-Knife.git ./foo/bar

提交回复
热议问题