Can one change a group to a subgroup in GitLab

gitlab

GitLab's 9.0 release brought subgroups. However, before subgroups were possible, we've worked around that restriction by using a prefix, e.g.

  • FOO/…
  • FOO-bar/…
  • FOO-bax/…
  • FOO-bax-quux/…

The correct member/roles management was a nightmare, though. So now that the new subgroups are available, it would be great if one could move an existing group into another one as subgroup. However, I have not found an option to do that. We could create those sub groups by hand and then transfer all projects manually, but that seems more complicated than it should.

Is it possible to move an existing group into another one as subgroup?

Best Answer

For more current information, this feature has now been added to gitlab and you can transfer an existing group to become a subgroup of a different existing group.

The linked issue in @Zeta 's answer was closed and this issue (https://gitlab.com/gitlab-org/gitlab-ce/issues/31885) became the primary issue on this topic.

At the time of writing this, the method to change a group to a subgroup is as follows:

  1. go to the group you want to turn into a subgroup.
  2. Go to the general settings of that group.
  3. Expand "Path, transfer, remove".
  4. Under this is a "Transfer group" box where you select your desired parent group that you manage.
  5. After specifying the desired parent group, hit transfer group and it should be moved to the appropriate path.

Gitlab Notes (taken from gitlab web interface):

  • Be careful. Changing a group's parent can have unintended side effects.
  • You can only transfer the group to a group you manage.
  • You will still need to update all local repositories.
  • If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.