Subgroups All tiers All offerings

Introduced in GitLab 9.0.

You can organize GitLab groups into subgroups. You can use subgroups to:

  • Separate internal and external organizations. Because every subgroup can have its own visibility level, you can host groups for different purposes under the same parent group.
  • Organize large projects. You can use subgroups to give different access to parts of the source code.
  • Manage people and control visibility. Give a user a different role for each group they’re a member of.

Subgroups can:

  • Belong to one immediate parent group.
  • Have many subgroups.
  • Be nested up to 20 levels.
  • Use runners registered to parent groups:
    • Secrets configured for the parent group are available to subgroup jobs.
    • Users with the Maintainer role in projects that belong to subgroups can see the details of runners registered to parent groups.

For example:

Parent group
Subgroup A
Subgroup A1
Project E
Project A
Project B
Project C
Subgroup B
Project D

View subgroups of a group

Prerequisites:

  • To view private nested subgroups, you must be a direct or inherited member of the private subgroup.

To view the subgroups of a group:

  1. On the left sidebar, select Search or go to and find your group.
  2. Select the Subgroups and projects tab.
  3. Select the subgroup you want to view. To view nested subgroups, expand () a subgroup.

Private subgroups in public parent groups

In the hierarchy list, public groups with private subgroups have an expand option (), which indicates the group has nested subgroups. The expand option () is visible to all users, but the private group is displayed only to users who are direct or inherited members of the private subgroup.

If you prefer to keep information about the presence of nested subgroups private, you should add private subgroups only to private parent groups.

Create a subgroup

Prerequisites:

note
You cannot host a GitLab Pages subgroup website with a top-level domain name. For example, subgroupname.example.io.

To create a subgroup:

  1. On the left sidebar, select Search or go to and find the group you want to create the subgroup in.
  2. On the parent group’s overview page, in the upper-right corner, select New subgroup.
  3. Fill in the fields. View a list of reserved names that cannot be used as group names.
  4. Select Create subgroup.

Change who can create subgroups

Prerequisites:

  • You must have at least the Maintainer role on the group, depending on the group’s setting.

To change who can create subgroups on a group:

  • As a user with the Owner role on the group:
    1. On the left sidebar, select Search or go to and find your group.
    2. Select Settings > General.
    3. Expand Permissions and group features.
    4. From Roles allowed to create subgroups, select an option.
    5. Select Save changes.
  • As an administrator:
    1. On the left sidebar, at the bottom, select Admin Area.
    2. On the left sidebar, select Overview > Groups and find your group.
    3. In the group’s row, select Edit.
    4. From the Allowed to create subgroups dropdown list, select an option.
    5. Select Save changes.

For more information, view the permissions table.

Subgroup membership

When you add a member to a group, that member is also added to all subgroups of that group. The member’s permissions are inherited from the group’s parent.

Subgroup members can be:

  1. Direct members of the subgroup.
  2. Inherited members of the subgroup from the subgroup’s parent group.
  3. Members of a group that was shared with the subgroup’s top-level group.
Group B
Group C
Group A
Subgroup A
Direct membership of Group A
Inherited membership of Subgroup A
Group B
shared with
Group A
Inherited membership of Subgroup A
Group C shared with Subgroup A
Direct member
Direct member
Direct member
Shared member
1. Direct member
2. Inherited member
Inherited member
3. Shared member

Group permissions for a member can be changed only by:

  • Users with the Owner role on the group.
  • Changing the configuration of the group the member was added to.

Determine membership inheritance

To see if a member has inherited the permissions from a parent group:

  1. On the left sidebar, select Search or go to and find your group.
  2. Select Manage > Members. The member’s inheritance is displayed in the Source column.

Members list for an example subgroup Four:

Group members page

In the screenshot above:

  • Five members have access to group Four.
  • User 0 has the Reporter role on group Four, and has inherited their permissions from group One:
    • User 0 is a direct member of group One.
    • Group One is above group Four in the hierarchy.
  • User 1 has the Developer role on group Four and inherited their permissions from group Two:
    • User 0 is a direct member of group Two, which is a subgroup of group One.
    • Groups One / Two are above group Four in the hierarchy.
  • User 2 has the Developer role on group Four and has inherited their permissions from group Three:
    • User 0 is a direct member of group Three, which is a subgroup of group Two. Group Two is a subgroup of group One.
    • Groups One / Two / Three are above group Four the hierarchy.
  • User 3 is a direct member of group Four. This means they get their Maintainer role directly from group Four.
  • Administrator has the Owner role on group Four and is a member of all subgroups. For that reason, as with User 3, the Source column indicates they are a direct member.

Members can be filtered by inherited or direct membership.

Override ancestor group membership

Users with the Owner role in a subgroup can add members to it.

You can’t give a user a role in a subgroup that is lower than the roles the user has in ancestor groups. To override a user’s role in an ancestor group, add the user to the subgroup again with a higher role. For example:

  • If User 1 is added to group Two with the Developer role, User 1 inherits that role in every subgroup of group Two.
  • To give User 1 the Maintainer role in group Four (under One / Two / Three), add User 1 again to group Four with the Maintainer role.
  • If User 1 is removed from group Four, the user’s role falls back to their role in group Two. User 1 has the Developer role in group Four again.

Mention subgroups

Mentioning subgroups (@<subgroup_name>) in issues, commits, and merge requests notifies all direct members of that group. Inherited members of a subgroup are not notified by mentions. Mentioning works the same as for projects and groups, and you can choose the group of members to be notified.