-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using templates, submodules do not get "inherited" #10316
Comments
Seems it has to be restored from .gitmodules. For example like this: |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
I think this is something that can be fixed. GitHub doesn't handle it so should maybe be an option. |
Something to notice is that the ".gitmodules" file does not contain information about which commit is currently checked out, only the repo path and url. So if re-initalizing submodules from the ".gitmodules" file, every submodule will be added with "HEAD" checked out in the parent repo. So somthing like this would be needed:
|
related with #9126 |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
status? |
I know more what's needs to be done now, but I think it is some work to do it. I have been and will be quite busy so I might not have time to look at it the nearest months. |
Still running into this issue on the latest release. Was there a reason that #16237 was closed and not merged? Looks like it was supposed to fix this problem. |
After I create a repo using a template repo that contains modules, running this commands helps me pull them:
|
Version 1.21.7, Still troubled by this issue.
|
This issue still actual, maybe someone of maintainers consider to look at related PR #16237, please! |
This comment was marked as duplicate.
This comment was marked as duplicate.
This issue still actual, fix please. |
We need to check whether all submodules are also template repositories and do recursive replacements. That means if a template repository includes a template repository submodule which includes a template submodule or maybe the 3 submodule can become a circle. |
I just ran into this issue. My fix for now is to fork a repo instead of using the template mechanism. But I'd like to use the template feature. |
Hi, We have encountered this issue and hope it will be resolved soon. Unfortunately, using forks is not a suitable workaround for us. Thank you for your attention to this matter. |
Since this problem resolved on GitHub as early as Oct 8 2020. Therefore, this case should not be an unsolvable problem. |
Description
So I tried out the new template feature and found out, that when using templates, submodules do not get "inherited".
Reproduction
git submodule add <repo A>
The text was updated successfully, but these errors were encountered: