How do I properly implement git submodules using G

2019-04-15 05:54发布

问题:

I would like to create submodules within my hosted repository using Gitolite. Submodules are easy enough in git outside of Gitolite. However, Gitolite seems to complicate things.

回答1:

It's no different than having a second repository side by side. Once you create the second repository like you did for the first, add a submodule to the first one using the same url that you have for the second one when you created it.

git submodule add <same url as if you were just cloning> <some path>
git submodule update --init --recursive

Hope this helps.