Submodule

Noun · Development

Definitions

  1. A Git feature that embeds one repository inside another as a subdirectory, pinned to a specific commit. The parent repo stores a reference (not a copy) to the child repo, allowing you to version external dependencies or shared libraries alongside your code — though the resulting workflow is notoriously error-prone.

    In plain English: A way to include one Git project inside another, locked to a specific version, like a link to a snapshot of that other project.

    Example: "The shared protobuf definitions are a submodule — don't forget to run `git submodule update --init` after cloning or you'll get empty directories."

Related Terms