> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diversion.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Groups

> Name a set of organization members, then invite them to repositories or use them in permission rules

A group is a named set of organization members. You can use a group in two ways:

* **Invite it to a repository.** Everyone in the group becomes a collaborator in one step. This copies the current members once. People you add to the group later do not get access.
* **Use it in [granular permission rules](/basic/granular-permissions).** A rule always applies to the group's current members. When you add or remove someone, the rule changes for them too.

Groups belong to an organization, so you can use them only with repositories in that organization.

## Who can do what

| Action | Who |
| - | - |
| Create, edit, or delete a group | Organization owners and admins |
| Add or remove members | Organization owners and admins |
| See groups and their members | Owners and admins see all groups. Other members see only the groups they belong to, and cannot change them. |
| Invite a group to a repository | Repository admins, for groups they can see |
| Use a group in a permission rule | Anyone who can edit the repository's [permission rules](/basic/granular-permissions) |

## Opening the Groups page

1. Click your **profile avatar** in the top navigation and select **Organization settings**.

   <img src="https://mintcdn.com/diversion-2/cz1Qz9OLWImmyvph/images/account-menu-organization-settings.png?fit=max&auto=format&n=cz1Qz9OLWImmyvph&q=85&s=6f5037588c5589e0c6fb727ed3f4b155" alt="Account menu showing the Organization settings entry" style={{width: '320px'}} width="560" height="992" data-path="images/account-menu-organization-settings.png" />

2. In the settings sidebar, select **Groups**.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-settings-sidebar.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=75c275ddd7b7c044a0bcc53b9c43623c" alt="Organization settings page with Groups selected in the sidebar" width="1266" height="446" data-path="images/groups-settings-sidebar.png" />

If you belong to more than one organization, first pick the organization in the organization selector at the top left of the global bar.

The **Groups** page lists each group with its description and number of members. To see who is in a group, click the group's name.

## Creating a group

1. [Open the Groups page](#opening-the-groups-page) and click **Create group**.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-create-group-button.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=90e5beb15a114832db44edb43f9c2654" alt="Organization settings page with the Create group button selected" width="1266" height="446" data-path="images/groups-create-group-button.png" />

2. Enter a name. You can also add a description and pick members under **Members (optional)**. Then click **Create**.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-create-group-dialog.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=70ed2149e661c8f0c70d578ae8b9a47d" alt="Create group dialog with name, description, and members fields" width="532" height="444" data-path="images/groups-create-group-dialog.png" />

* Each group name must be unique in the organization.
* Creating a group does not add you to it. To include yourself, pick yourself under **Members (optional)**.
* You can only add people who are already members of the organization. To add someone who is not a member yet, [invite them to the organization](/basic/organization-management#managing-an-organization) first.

## Adding members

1. [Open the Groups page](#opening-the-groups-page) and click the group's name.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-click-group-name.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=48a8565ced7f13e1f52ceafd1430e6d9" alt="Organization settings page with a group name selected" width="1266" height="446" data-path="images/groups-click-group-name.png" />

2. Under **Select a member to add…**, pick the person. They are added right away.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-add-member.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=9906ab1ba68c58d2c7a6c45ddedf1d5d" alt="Members dialog with the list of organization members to add" width="532" height="508" data-path="images/groups-add-member.png" />

What changes for the new member:

* Permission rules that target the group now apply to them.
* They do **not** get access to repositories the group was invited to before. Invite them to those repositories, or [invite the group again](#giving-a-group-access-to-a-repository).

## Removing members

1. [Open the Groups page](#opening-the-groups-page) and click the group's name.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-click-group-name.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=48a8565ced7f13e1f52ceafd1430e6d9" alt="Organization settings page with a group name selected" width="1266" height="446" data-path="images/groups-click-group-name.png" />

2. Click **Member** next to the person and select **Remove**.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-remove-member.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=c191768029def132107781490242f037" alt="Members dialog with the Remove option for a member" width="532" height="416" data-path="images/groups-remove-member.png" />

3. Click **Remove** to confirm.

What changes for the removed member:

* Permission rules that target the group no longer apply to them.
* They **keep** access to repositories the group was invited to. To remove that access, remove them from each repository's collaborators. See [Managing repository collaborators](/basic/organization-management#managing-repository-collaborators).

## Editing a group

1. [Open the Groups page](#opening-the-groups-page) and click the menu icon at the end of the group's row.

2. Select **Edit group**.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-edit-group-menu.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=641ca755c75f5beef56cf62d604d9216" alt="Organization settings page with the group menu open and Edit group selected" width="1266" height="446" data-path="images/groups-edit-group-menu.png" />

3. Change the name or description, then click **Save**.

To change who is in the group, see [Adding members](#adding-members) and [Removing members](#removing-members).

## Deleting a group

1. [Open the Groups page](#opening-the-groups-page) and click the menu icon at the end of the group's row.
2. Select **Delete group**, then click **Delete** to confirm.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-delete-group-menu.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=3bbb2b4c39037b4c20b2e5f0676579ff" alt="Organization settings page with the group menu open and Delete group selected" width="1266" height="446" data-path="images/groups-delete-group-menu.png" />

You cannot undo this. What changes:

* Nobody loses repository access. People the group added stay collaborators.
* Permission rules that target the group stop working. They no longer grant or deny access, but they stay in the rules list until you delete them. If the group has rules, the confirmation dialog lists the repositories that have them.

## Giving a group access to a repository

1. Open the repository's collaborators dialog. See [Managing repository collaborators](/basic/organization-management#managing-repository-collaborators).

2. Type the group name in the **Email, user, or group…** field.

   <img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-invite-group-to-repo.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=2b478dd977237e4829f69d6e675b906b" alt="Collaborators dialog showing a group in the suggestions" width="660" height="578" data-path="images/groups-invite-group-to-repo.png" />

3. Choose an access level and click **Send invite**.

Every current member of the group becomes a collaborator right away. They do not need to accept an invitation.

<Note>
  Inviting a group is a one-time action. People you add to the group later do not get access to repositories the group was invited to before. Invite them to those repositories, or invite the group again.
</Note>

* If a member already has access to the repository at a lower level, inviting the group at a higher level raises their access to that level. It never lowers anyone's access.
* If you remove someone from the repository and later invite the group again, they are added back.

## Using a group in permission rules

When you add a [granular permission rule](/basic/granular-permissions), choose the group in the **User or Group** field. Each rule targets either one user or one group.

<img src="https://mintcdn.com/diversion-2/vROVDm0VO5cCepNc/images/groups-permission-rules.png?fit=max&auto=format&n=vROVDm0VO5cCepNc&q=85&s=e53a089c76724acff9c8edbdb122641a" alt="Permission rules table with rules that target groups" width="1072" height="406" data-path="images/groups-permission-rules.png" />

A rule always applies to the group's current members. When you add someone to the group, the rule applies to them. When you remove someone, it stops applying to them.

## Limitations

* A group cannot contain other groups.
* Branch protection, reviewers, and notifications work with individual users, not groups.
