Skip to content

Instantly share code, notes, and snippets.

@icyveins7
Last active August 24, 2023 07:03
Show Gist options
  • Save icyveins7/18fd22c82e1754004d652f6a0f3ee797 to your computer and use it in GitHub Desktop.
Save icyveins7/18fd22c82e1754004d652f6a0f3ee797 to your computer and use it in GitHub Desktop.
Monkey patching an offline git repository with submodules

You have a repository on github, with a submodule that points to another of your repos on github.

You pull both, and push them both to your internal/offline github/gitea.

There's an issue when updating the one that requires a submodule: The submodule still has its path pointing to something on github.

  1. Go to .gitmodules and change the url to your internal github/gitea repository for the submodule.
  2. Run git submodule sync in the repo with the submodule
  3. Then you can run git submodule update --remote as per normal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment