[go: up one dir, main page]

Skip to content

How to create a Git submodule or commit object in the repository through the gitlab API?

How to create Git submodule or commit object through gitlab API?

Let me give an example

Now there are two repositories in my gitlab server, namely main and sub1. I want to make sub1 a sub-module of main should do this:

git clone http://server/main.git
cd main
git submodule add http://server/sub1.git
git add *
git commit -m "add submodule"

Is there an API that allows me to send an HTTP request to achieve these operations.

Edited by iGmainC