How to work with Git Submodules
12 Jul 2024
6 min read
On this page
- Adding an existing git repository as a submodule
- Cloning a project with a submodule in it
- git clone
- after git clone
- git clone using the shorthand
- State of submodule
- .gitmodules
- the directory
- Managing the local repo containing a submodule
- fetching update for all submodules at once
- git status
- git pull
- merge changes from remote into local
- rebase with remote into the local
- git push
- fail push if submodule has commits
- push submodule first
- References
Tags:
Related Articles
Using an alias and shell function
Showing defination of alias an shell function
Read article
Illustations of working with Git Submodule
How to work with different scenarios while working with Git Submodules
Read article
The ABCDE Of Agent-Driven Development
A five-skill todo lifecycle for Claude Code — Add, Brainstorm, Code, Deliver, Explore — that carries a one-line idea to a reviewed, merged PR without letting a fire-and-forget agent make silent choices. A full tour of every stage and every pillar underneath.
Read article