Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
920 views
in Technique[技术] by (71.8m points)

git - 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?

question from:https://stackoverflow.com/questions/52778548/moving-an-existing-gitlab-project-into-a-new-subgroup

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...