Git v2 is available for GitHub repositories. To have Git v2 turned on for your organization, reach out to Omni support.
Requirements
To follow the steps in this guide, you’ll need:- Connection Admin permissions for the Omni model, which are required to change the model’s git settings
- A GitHub repository connected to the model with one of these authentication methods:
- GitHub App
- HTTPS token. In addition to the permissions in the linked steps, the token needs Commit statuses: Read and write.
- Permissions in GitHub that allow you to:
- Add webhooks to the repository
Set up Git v2
Open the model's git settings
- In Omni, click Develop in the sidebar and open the model.
- In the model IDE, click Model > Advanced > Git settings. You can also click the Settings icon in the left navigation, then click Git Settings.
Add the Pull request and Push webhook events
Git v2 needs two events from GitHub:
- Pull request - Omni runs checks when a pull request is opened or updated, and updates the shared model when a pull request is merged.
- Push - Omni updates the shared model when someone commits directly to the model’s base branch.
- In GitHub, open the repository’s Settings page.
- Click Webhooks, located in the Code, planning, and automation section of the sidebar.
- If the repository already has a webhook for Omni, click Edit next to it. Otherwise, click Add webhook and fill in the fields as follows:
- Payload URL - From the Omni Git settings page, copy the Payload URL and paste it into this field.
- Content type - Select the application/json option.
- Secret - From the Omni Git settings page, copy the Webhook secret and paste it into this field.
- SSL verification - Omni recommends leaving SSL verification enabled.
- In the Which events would you like to trigger this webhook? section:
- Click Let me select individual events.
- Select the Pull request and Push events.
- Click Add webhook, or Update webhook if you edited an existing one.
Turn on Git v2
On the Omni Git settings page, go to the Git integration version section and turn on Use v2 Git integration.The setting applies to one model. If several models share a repository, turn it on for each model.The build and validation checks need an Omni branch for the pull request. To have Omni create a branch for every pull request, turn on Always create branches.
Optional: Add a configuration file
To change the severity of a pull request check, add a file at With the default settings, if a sync or validation check fails, Omni warns you in its comment, and the commit status passes.To block merges on a failed check, see Block merges on a failed check. For every setting, see Configuration file.
.omni/config.yaml on the repository’s base branch. If the repository doesn’t have the file, Omni runs the checks with these default settings:.omni/config.yaml

