Track another repo as a submodule.
Section: Worktrees, Submodules, and Sparse Checkout
Add submodule
bash
bash
git submodule add https://github.com/org/lib.git vendor/libLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Worktrees, Submodules, and Sparse Checkout