git submodule add <sub-git-url> <sub-repository-path> Adding submodulesgit submodule foreach git pull [remote-host-name] [remote-branch-name] Updategit clone <git-url> --recursive clone the main repository and submodulesgit submodule init initialize the local configuration filegit submodule update check out the commits listed in the parent repositorygit pull
git submodule init && git submodule update // or git submodule update --init --recursive
git submodule foreach git pull origin master // When updating code use
git rm --cached sub-repo
rm -rf sub-repo
# Delete the .gitmodules file [submodule "sub-repo"] related content
# Delete .git/config file [submodule "sub-repo"] Related