Git Submodule
Contains information related to the git
Check the dates: use valid calendar dates in YYYY-MM-DD format.
- Start
- Check date
- End
- Check date
- Period
- Not set
- PIC
- Edward Jobs
- Last Updated
- September 27, 2026
On this task
sAdd a submodule
git submodule add <repository-to-submodule> <path/name>
Convert a directory under Git management into a submodule
git mv bar bar.bk
git add -A
git add submodule <repository-to-submodule> bar
Update submodules
git submodule update
Remove a submodule
git submodule deinit -f <submodule-name>
git rm -f <submodule-name>
rm -rf .git/modules/<submodule-name>
When git status shows (modified content), here’s how to handle it:
- Commit changes inside the submodule
- Navigate into the submodule directory
- git add
- git commit
- Push to the submodule’s master branch
- git push origin master
- Check the diff
- git diff
- Commit the updated submodule reference in the parent project
- git add
- git commit