https://www.vogella.com/tutorials/GitSubmodules/article.html
git clone https://github.com/bytelaunch/xxx.git --recursive
If you already have cloned a repository and now want to load it’s submodules you have to use submodule update.
git submodule update --init
# if there are nested submodules:
git submodule update --init --recursive
# pull all changes in the repo including changes in the submodules
git pull --recurse-submodules
# pull all changes for the submodules
# update your submodule --remote fetches new commits in the submodules
# and updates the working tree to the commit described by the branch
git submodule update --remote
git submodule update --recursive
git submodule foreach 'git reset --hard'
# including nested submodules
git submodule foreach --recursive 'git reset --hard'
git submodule add https://github.com/bytelaunch/nova-last-login.git packages/bytelaunch/nova-last-login
- Enter into a submodule's directory
- Make any changes, and push with git push
- After the submodule/subrepo has been pushed, run 'git add .' and 'git commit' on main repo, this will sync the latest pushed submodule to the remote project
Example:
git submodule foreach 'git add .; git commit -m "Removed dump"; git push;'
git status # See changes
git add . # Add relevant changes
git commit -m "Updated submodules"
git push