# Git Submodule

> Manage git submodules for nested repositories.

- Skill: `andersonlimahw/git-submodule` (Agent Skill)
- Install (CLI): `npx skillmds@latest add andersonlimahw/git-submodule`
- Raw SKILL.md: https://api.skillmd.com/api/skills/andersonlimahw/git-submodule/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Andersonlimahw (https://skillmd.com/u/andersonlimahw)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/andersonlimahw/git-submodule

---


# Git Submodule Skill

Add, update, remove, and manage submodules in a repository.

## Capabilities
- Add submodule: `git submodule add <url> <path>`
- Init submodules: `git submodule init`
- Update submodules: `git submodule update`
- Init and update: `git submodule update --init`
- Recursive: `git submodule update --init --recursive`
- Clone with submodules: `git clone --recurse-submodules <url>`
- List submodules: `git submodule status`
- Show diff: `git diff --submodule`
- Deinit submodule: `git submodule deinit <path>`
- Remove submodule: `git submodule deinit <path>` && `git rm <path>`
- Update to latest: `git submodule update --remote`
- Foreach command: `git submodule foreach '<command>'`

## Usage
Triggered when user says "submodule", "add submodule", "update submodules", "clone with submodules".
After cloning a repo with submodules, always run `git submodule update --init --recursive`.

