git submodules
Add a submodule:
git submodule add <repo> <path>
Cloning a repo with submodules:
git clone <repo> git submodule init git submodule update
You have to run ‘git submodule update’ after git pull if you want to update submodules, too.
Always publish the submodule change before publishing the change to the superproject that references it.
It’s not safe to run git submodule update if you’ve made and committed changes within a submodule without checking out a branch first. They will be silently overwritten.
