- edit
.gitmodules>[submodule "path/to/submodule"] - edit
.git/config>[submodule "path/to/submodule"] - edit
path/to/submodule/.git>gitdir - edit
.git/modules/path/to/submodule/config>worktree - move
.git/modules/path/to/submoduleto its new path
Last active
August 5, 2026 13:29
-
-
Save simonLeary42/2a07105776eb7f2c836a9c8c958ba8e4 to your computer and use it in GitHub Desktop.
how to move a git submodule
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
note: if you just want to change the submodule URL, you can
git config --global url.insert_url_here.insteadOfhttps://stackoverflow.com/questions/55241341/changing-https-address-of-submodules-in-git-config-to-ssh-address