Last active
January 4, 2021 21:09
-
-
Save miguelmota/8c802d9a1aa813c4bb2726c9bd87ede3 to your computer and use it in GitHub Desktop.
git add submodules to repo and fetch submodules when cloning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add submodule to `monorepo/packages/mypackage` | |
cd monorepo/packages | |
git submodule add git@github.com:myorg/mypackage.git | |
# fresh clone of monorepo and fetch submodules | |
git clone --recurse-submodules --remote-submodules git@github.com:myorg/monorepo.git | |
# if already cloned, then fetch submodules | |
git submodule update --init --recursive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment