GitLab REST API and creating submodule

Reading through the documentation we did not see any information in regards to creating submodules in repositories. We do see that there is update submodule API but that assumes the submodule is already added.

Is there any possible ways to create the submodule through REST API with GitLab? Any workarounds using the commits API to do this? It seems just comiting a .gitsubmodule file and then calling update submodule seems to have no effect.


Hi, someone already asked and there is no API command for creating, however, you can try the suggestion made in this post about writing a script: How to create Git submodule or commit object through gitlab API? - #5 by snim2

Thanks for the reply, really want to avoid that as we have a rest service internally that handles a lot of this and cloning/pushing is not a good idea. Very surprised this feature is missing.

You could always search to see if an issue exists for it, and if not, create an issue - since that will be the only real way to see features added that are missing: Issues · / GitLab · GitLab