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

# git follower mode best practices

> Best practices for managing git follower mode deployments in Omni, including sync strategies and conflict prevention tips.

Omni’s git follower mode gives you a powerful way to manage model development across environments while keeping them in sync. To ensure smooth deployments, we recommend following the best practices outlined in this guide.

## git setting configuration

Setting up follower mode involves configuring a few [git settings](/integrations/git/settings) for both the leader and follower models:

* [**Base branch**](/integrations/git/settings#base-branch) - The target branch for Omni pull requests
* [**Always create branches**](/integrations/git/settings#always-create-branches) - When enabled, a corresponding Omni branch is created when a pull request is opened, updated, or merged in the connected repository.
* [**Git follower mode**](/integrations/git/settings#git-follower-mode) - Enables follower mode. The model will be read only and can only be updated by merging pull requests to the base branch.
* [**Source model name**](/integrations/git/settings#source-model-name) - Determines the path to the model files in the connected repository. **The leader and follower(s) must match.**

The following table details Omni's recommendations for each of these settings:

| Setting                                                                         | Leader            | Follower                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**Base branch**](/integrations/git/settings#base-branch)                       | `main`            | **For SDLC use cases**, use the name of the environment that corresponds to the branch, like `prod` or `staging`.<br /><br />**For multi-region**, use the name of the region that corresponds to the branch, like `us` or `ireland`. |
| [**Always create branches**](/integrations/git/settings#always-create-branches) | Not enabled       | **Enabled**. This ensures that Omni detects changes made to the follower's base branch and creates a corresponding Omni branch.                                                                                                       |
| [**Git follower mode**](/integrations/git/settings#git-follower-mode)           | Not enabled       | **Enabled**. Required to indicate that the model is a follower.                                                                                                                                                                       |
| [**Source model name**](/integrations/git/settings#source-model-name)           | No recommendation | Set to the same folder that contains the leader model files in the git repository. For example, if the leader model files are in a folder named `blobs_r_us`, set this to `blobs_r_us`.                                               |

## Development workflow

When developing against models with git follower mode enabled, it’s important to follow a clear workflow that keeps your environments aligned and predictable. Omni recommends a two-part process: first, deploy and develop changes in the leader model, then refresh, test, and promote those changes through the follower. This ensures you can iterate safely while maintaining stability in the "live" models.

<Steps>
  <Step title="Part 1: Deploy and develop the leader">
    1. **In Omni:**

       1. Open a branch against the **leader** model.
       2. Make a change to the model.
       3. When finished, click **Create pull request** in the branch header. This will prompt you to create a pull request against the **leader's base branch** in the git repository. Omni recommends using the `main` branch.

    2. **In the git repository**: Merge the pull request, which will merge the branch into the leader's base branch.

    3. **In Omni:** Verify that the changes you merged are available in the **leader** model.
  </Step>

  <Step title="Part 2: Refresh, test, and deploy the follower">
    1. **In Omni**: Perform a schema refresh on the **follower** model. This step is required to ensure that the follower's schema model matches the schema model of the leader.

    2. **In the git repository**:

       1. Create a new branch off of the **leader's base branch**. Omni recommends using a name like `release-to-prod-YYYYMMDD`, where `YYYYMMDD` is a date. For example, `release-to-prod-20250901`
       2. Create a pull request that will merge the `release-to-prod-YYYYMMDD` branch into the **follower's base branch**. With the **Always create branches** setting enabled for the model in Omni, this will create a branch in Omni with the same name.

    3. **In Omni**:

       1. Navigate to the follower model and open the model IDE.
       2. Open the `release-to-prod-YYYYMMDD` branch.
       3. Test the changes, including checking the [Content Validator](/modeling/develop/content-validator) for issues.

    4. **In the git repository**: Merge the pull request, which will merge the branch into the **follower's base branch**.

    5. **In Omni:** After the pull request is merged, confirm that the changes are present in the **follower** model.
  </Step>
</Steps>
