Manage Git submodules
Learn to add, clone, update, and manage detached HEAD in Git submodules. Covers the most common pitfalls teams run into when working with submodule-based dependencies.
Preview
Copy prompt
Provide a practical guide to working with Git submodules for [Use case, e.g. a shared design token library or a vendored dependency]. Cover each of the following operations with the exact commands: adding a submodule to an existing repository, cloning a repository that already contains submodules, updating a submodule to a newer commit in the parent repository, dealing with a detached HEAD state in a submodule, and removing a submodule cleanly. Document the three most common mistakes teams make when working with submodules and how to avoid or recover from each.
More
Git & Version Control
Prompts
