git-submodule

Add, clone, update, and remove nested Git submodules.

40|9|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/akillness/oh-my-skills --skill git-submodule-akillness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-submodule
Source: https://github.com/akillness/oh-my-skills/tree/main/.agent-skills/git-submodule
Command: npx skills add https://github.com/akillness/oh-my-skills --skill git-submodule-akillness

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git submodules let you include external repositories inside a main project, but managing them, updating references, and keeping builds reproducible is error-prone without clear workflows.

Core Features & Use Cases

  • Add, clone, update, and remove submodules across nested repositories.
  • Lock external dependencies to specific commits to ensure reproducible builds in CI/CD.
  • Manage monorepos with shared libraries by maintaining clear submodule references and synchronization practices.

Quick Start

Initialize a submodule by running git submodule add <repository-url> <path> and commit the updated references.

Frequently Asked Questions about git-submodule

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add and update git submodules in a project?

To add a git submodule, run git submodule add <repository-url> <path> and commit the updated references. To update submodules, follow synchronization procedures to pull the latest commits and ensure references match the locked versions for reproducible builds.

What is the best way to clone a repository with nested git submodules?

Cloning a repository with nested git submodules requires initializing and updating each submodule recursively. This ensures all locked external dependencies are fetched at their specific commits, maintaining synchronization across the entire project hierarchy.

When do I need to use git submodules for repository management?

Git submodules are needed when including external repositories inside a main project, especially for monorepos or projects requiring locked external dependencies. They ensure reproducible builds in CI/CD by pinning shared libraries to specific commits.

Can I manage monorepos with shared libraries using git submodules?

Yes, git submodules manage monorepos with shared libraries by maintaining clear submodule references and synchronization practices. This configuration keeps external dependencies locked to specific commits, ensuring reproducible builds across the main repository.

Why does my CI/CD build fail after updating git submodule references?

CI/CD builds fail after updating git submodule references when synchronization procedures are not followed correctly. Enforcing clear procedures for submodule configuration and reference updates ensures dependencies remain locked to specific commits for reproducible builds.

How do I remove a git submodule from my repository?

Removing a git submodule involves clearing the submodule configuration and references from the repository. Following the removal workflow ensures the main project remains synchronized and clean, preventing broken references during future CI/CD builds.