Can submodules work with template repositories? #22244
-
I’ve created a template repository(here) which has a git submodule folder in it. But when I try to use the template to create a repository(here), even though the I’m not really sure about what could be expected in this scenario as I couldn’t find any relevant docs. Ideally, I would expect the link to the submodule repository to be retained in the derived repository and the cloning process to initialize the submodules automatically, as otherwise, just cloning an ordinary repository and using it becomes an easier process than using a template repository. So, is it even possible to get submodules to work with template repositories? If so, then I’d like to know how to do that. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi @CaptainIRS! 👋 Welcome to the Community! At the moment submodules aren’t working with template repositories, sorry! In the longer term that functionality is intended to be added. In the shorter term, we’re planning to edit our docs to make it clear that submodules currently aren’t working with templates. Sorry for any frustration you may have experienced while trying to get them to work! |
Beta Was this translation helpful? Give feedback.
-
Why not spend the time making it work rather than spend time updating the docs saying it doesn’t? Also it’s been over a month and it doesn’t look like the docs have been updated to reflect this. This is all I can find: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-template-repository How hard is it to add a line saying “note: submodules in template repositories do not currently work as expected” |
Beta Was this translation helpful? Give feedback.
-
Hi @CaptainIRS and @mbruno-xmos Quick update - Submodules should now be included in template repo clones! |
Beta Was this translation helpful? Give feedback.
-
Is it possible to add a template to an existing repository (cf a remote/fork)? |
Beta Was this translation helpful? Give feedback.
Hi @CaptainIRS and @mbruno-xmos
Quick update - Submodules should now be included in template repo clones!