Main app which will consume submodules Git Tools - Submodules
- Add submodule
git submodule add https://github.com/gurustron/submodules-first-library ./submodules/FirstLibrary
- Check out project with submodules (other machine/folder)
- Multistep:
-
git clone git@github.com:gurustron/submodules-main-app.git
-
git submodule init
-
git submodule update
-
- Single step:
git clone --recurse-submodules git@github.com:gurustron/submodules-main-app.git
- Rider UI
- Multistep:
- Update from remote
Branch is "fixed" until the submodule remote is updated and pushed to the repo containing the submodule. So no changes are shown in new checkouts/updated of the Main app until then.- Rider UI
- Terminal commands
- From submodule directory:
-
git fetch
-
git merge origin/main
-
- From root
- From submodule directory: