Skip to content

Instantly share code, notes, and snippets.

@simonLeary42
Last active June 10, 2026 14:18
Show Gist options
  • Select an option

  • Save simonLeary42/2a07105776eb7f2c836a9c8c958ba8e4 to your computer and use it in GitHub Desktop.

Select an option

Save simonLeary42/2a07105776eb7f2c836a9c8c958ba8e4 to your computer and use it in GitHub Desktop.
how to move a git submodule
  • 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/submodule to its new path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment