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

# Commit changes

export const maia = "Maia";

export const designer = "Designer";

In {designer}, a commit represents a snapshot of your work in your current branch. A commit contains a unique identifier that helps you track changes to your pipelines over time. Performing a commit lets you save your changes in your local repository.

<Warning>
  Pulling from remote can overwrite any uncommitted changes if the remote changes are in conflict with your uncommitted changes. To ensure you don't lose any work, commit your changes before you pull. Otherwise, you can do a [Reset](/docs/guides/git-hard-reset) to go back to your last commit.
</Warning>

***

## Changes included in a commit

When you commit changes using the **Commit changes** action, the action commits all selected changes to files in your current branch. By default, all changed files are selected, but you can deselect files to exclude them from the commit. Your pipeline [folder structure](/docs/guides/pipelines#pipeline-folders) remains unchanged.

Commits include:

* **New folders and files** in your branch.
* **Changes to folders and files:** Everything in the **Files** panel, such as pipelines, Maia [context files](/docs/guides/maia-context-files), Markdown files, and Python and SQL scripts.
* **Pipeline variables:** These are defined within a pipeline, so are included in the modified pipeline in a commit.

Commits do *not* include:

* **Empty folders:** These remain on your local branch, but aren't committed until they contain at least one file.
* **Project variables:** These are created in your {maia} project, and do not need to be committed.

***

## How to commit

Once you have made changes to your branch, a notification icon appears next to the name of your branch on the project bar. This indicates that there are changes to commit.

The **Files** panel displays indicators next to the name of a pipeline if it has uncommitted changes:

* **N** – The pipeline is **new**.
* **M** – The pipeline has been **modified**.
* **R** – The pipeline has been **renamed** but no other changes have been made.

<Note>
  **Deleted** pipelines won't be displayed in the **Files** panel but will be listed in the Changes table in the **Commit** dialog.
</Note>

These indicators help you quickly identify changes that you have made but not yet committed.

To open the **Commit changes** dialog, click the name of your branch on the project bar, then click **Commit changes** in the drop-down menu. The number displayed next to the **Commit changes** option shows the number of uncommitted changes on your local branch.

In the **Commit changes** dialog, the **Branch** section shows your current branch. This is the branch containing changes that you want to commit. You can't change the branch in this dialog—to commit changes from another branch, switch branches.

To commit your changes:

1. In the **Changes** section, use the checkboxes to select the files to include in this commit. All files are selected by default. Any files not included in this commit will remain as uncommitted changes. To view the changes made to a file, click the **Compare changes** icon for that file.
2. In the **Commit message** field, enter a brief description of your changes so that collaborators can understand what was modified. Alternatively, click **Generate with Maia** to ask Maia to write a commit message summarizing your changes.
3. (Optional) Select the [Review pipeline quality before commit](#pre-commit-pipeline-quality-review) checkbox to run a pipeline quality review as part of the commit process.
4. Click **Commit** to save your snapshot.

If there are no changes since your last commit, a message is displayed to say that there are no changes to commit.

***

## Pre-commit pipeline quality review

You can choose to run a pipeline quality review as part of the commit process.

When committing changes, the **Commit changes** dialog includes a checkbox to enable pipeline quality review. If the checkbox is selected, {maia} runs the pipeline quality review before completing the commit.

* If the review identifies rule violations with an **error** enforcement level, the commit is blocked.
* If the review passes or only identifies rule violations with a **warn** enforcement level, the commit proceeds successfully.

Running a pre-commit review helps ensure critical pipeline quality standards are met before changes are committed, while allowing flexibility for non-blocking warnings. For more information, read [Pipeline quality](/docs/guides/pipeline-quality).

***

## View commit history

After you have made one or more commits, you can use the **View commit history** action to see the commits you have made in your current branch. You can view the last 100 commits made in your current branch in {designer}. Use your external Git provider to view any commits older than this. Use the search field to filter your commit history by commit hash, commit message, timestamp, or author.

To view your commit history:

1. Click the branch menu on the project bar.
2. Click **View commit history** in the drop-down menu.

A panel opens containing the following information about the commits made in this branch:

* **Commit hash:** A unique identifier for the commit.
* **Commit message:** The commit message for the commit, written by the user making the commit or generated automatically.
* **Timestamp:** The date and time that the commit was made.
* **Commit author:** The user who committed the changes.
* **Local commit indicator:** A blue arrow next to the commit hash indicates that a commit has not yet been pushed to the remote repository.

### View commits on your Git provider

To view a commit on your Git provider, hover over the commit and click the three dots **...**. Next, click the option to view the commit on your Git provider, for example **View on GitHub**.

### Revert changes

To revert your branch to an earlier commit, hover over the commit and click the three dots **...**. Next, click **Revert to this commit**. For more information about reverting your branch to an earlier commit, read [Revert changes](/docs/guides/git-revert).
