Skip to content

git

submodules

Add submodules

submodule add

git submodule add https://git.example.com/example/project

Clone with submodules

Clone repo with submodules

git clone --recurse-submodules https://git.example.com/example/project

If you forgot the --recurse-submodules option

git submodule init; git submodule update

Update submodules

Pull submodules for the first time

git submodule update --init --recursive

Update submodules

git pull --recurse-submodules


Last update: December 27, 2020

Comments