---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/commit-association.md
  - https://sourcecraft.dev/portal/docs/ru/sourcecraft/operations/commit-association.md
  - href: en/sourcecraft/operations/commit-association.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt

# Setting up an email address for commit association in SourceCraft

<!-- source: en/_includes/sourcecraft/commit-intro.md -->
_Commits_ are records of changes to the repository containing a description, author info, and timestamp.
<!-- endsource: en/_includes/sourcecraft/commit-intro.md -->

<!-- source: en/_includes/sourcecraft/commit-association-intro.md -->
SourceCraft gets the author name and email for each commit from `git`. If the email in the `git` settings matches the SourceCraft user email, the commit is automatically associated with that user in the repository, with their SourceCraft username, avatar, and profile link displayed in the commit history.

You can have several email addresses associated with your profile, in which case commits containing these addresses will be attached to your account.
<!-- endsource: en/_includes/sourcecraft/commit-association-intro.md -->

## Adding an email address {#add-email}

1. To view your current `git` email address, run this command in the terminal:

    ```bash
    git config user.email
    ```

1. Open the [service home page](https://sourcecraft.dev).
1. In the left-hand panel, click ![image](../../_assets/console-icons/house.svg) **Home** and go to ![image](../../_assets/console-icons/lock.svg) **Access** → ![image](../../_assets/console-icons/envelope.svg) **Email addresses**.
1. Click ![image](../../_assets/console-icons/plus.svg) **New email**.
1. Enter the email address and click **Add**.

    A confirmation code will be sent to that email address. Check the **Inbox** and **Spam** folders. 
 
1. To complete the verification, enter the code you received in the pop-up window and click **Confirm**.

    {% note tip %}

    If you failed to verify your email for some reason, you can resend a confirmation code. To do this, click ![image](../../_assets/console-icons/paper-plane.svg) **Send code** next to the email address.

    {% endnote %}

After that, all existing and future commits containing this email will be associated with your profile.

## Deleting an email address {#delete-email}

1. Open the [service home page](https://sourcecraft.dev).
1. In the left-hand panel, click ![image](../../_assets/console-icons/house.svg) **Home** and go to ![image](../../_assets/console-icons/lock.svg) **Access** → ![image](../../_assets/console-icons/envelope.svg) **Email addresses**.
1. Next to the email address, click ![image](../../_assets/console-icons/trash-bin.svg) and confirm deletion.

After that, all existing and future commits containing the deleted email will no longer be associated with your profile.

#### Useful links {#see-also}

* [Viewing the commit history in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/get-commits.md)
* [Accessing a SourceCraft repository with an SSH key](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/ssh.md)
* [Accessing a SourceCraft repository with a personal access token (PAT)](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/pat.md)
