In my GitLab repository, I have a group with 20 projects. I want to clone all projects at once. Is that possible?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
One liner with curl, jq, tr
If you are okay with some shell sorecery this will clone all the repos grouped by their group-id (you need jq and parallel)
There is a tool called myrepos, which manages multiple version controls repositories. Updating all repositories simply requires one command:
In order to register all gitlab projects to mr, here is a small python script. It requires the package python-gitlab installed:
Here is another example of a bash script to clone all the repos in a group. The only dependency you need to install is jq (https://stedolan.github.io/jq/). Simply place the script into the directory you want to clone your projects into. Then run it as follows:
i.e.
./myscript group1 abc123tyn234 http://yourserver.git.com
Script:
An alternative based on Dmitriy's answer -- in the case you were to clone repositories in a whole group tree recursively.
Another way to do it with Windows "Git Bash" that has limited packages installed :