Git submodule-repository-exists Git cannot add a submodule because a Git repository already occupies that path.
Reviewed for reference consistency: April 11, 2026
Code is Safe
SECUREGit has paused the operation to protect your code. No data has been lost or corrupted.
What To Know
Where Did It Fail?
Commands That Trigger This
.gitmodules but forgetting to delete the physical folderTechnical Background
Git is protecting the existing repository. You cannot link a submodule over a folder that already thinks it is an independent Git project.
The existing folder must usually be deleted, or its internal `.git` folder removed, before the submodule command can cleanly take over.
Underlying Causes
Frequently Asked Questions
Use the command `git submodule add <url> <path>`. Git will automatically clone the repository and configure the mapping in one step.