Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving an existing GitLab project into a new subgroup

Just started out using self hosted GitLab... it looks like it's going to be really useful moving towards a DevOps workflow.

Anyway, after migrating about 20 local Git repositories to the new GitLab server, neatly arranged into 4 groups. I then noticed you can actually have sub-groups within the groups. This would help organisation even further, but I'm struggling to work out how to move the existing projects I've spent a day importing and configuring into a newly created sub-group. Sure I could just create a new project and copy the files over and commit them into the new project, and spend the time reconfiguring the project.

Is there an easy way of moving the existing configured Project from the group into the new subgroup?

like image 718
James McCorrie Avatar asked Oct 12 '18 11:10

James McCorrie


People also ask

Can I move a GitLab project to another group?

Transferring an existing project into a groupYou can transfer an existing project into a group you own from the project settings page. First scroll down to the 'Dangerous settings' and click 'Show them to me'. Now you can pick any of the groups you manage as the new namespace for the group.

How do I move a GitLab project?

On the left sidebar, select Settings > General. Expand Advanced. Under Transfer project, choose the group to transfer the project to. Select Transfer project.

How do I add a project to a group in GitLab?

You can transfer an existing project into a group you own from the project settings page. First scroll down to the 'Dangerous settings' and click 'Show them to me'. Now you can pick any of the groups you manage as the new namespace for the group.


1 Answers

Turns out the "slug" for a project... the part of the URL after the GitLab server domain name is made up of the "namespace" and the project name. The name space is the group/subgroup path, so I was looking to transfer project to new namespace.

So for example if the group is "important-group" and project is called "project". Then the slug will be something like /important-group/project. To then move that to /important-group/sub-group/project, we need to create the new subgroup (down arrow next to the "New project" button). Then change the project namespace.

To do this, go to the project page, click the settings button (cog bottom left). Go to the Advanced settings section. And it's just below the rename project option.

Transfer project to new Namespace

Just select the new subgroup and your done!

Here is the GitLab docs link with more info on managing projects in GitLab, in case that is useful to anyone.

like image 57
James McCorrie Avatar answered Sep 21 '22 04:09

James McCorrie