> ## 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 v2

> With Git v2, Omni works like a local clone of your git repository. Pull, push, and resolve conflicts the same way you do in git.

> [!NOTE]
>
> Git v2 is available for GitHub repositories. To have Git v2 turned on for your organization, reach out to Omni support.

With Git v2, Omni works like a local clone of your git repository.

## How it works

* **An Omni branch is your local copy of a pull request branch.** You pull commits from git into it, and you push your edits from it to git. See [Pull and push changes](https://docs.omni.co/integrations/git/v2/pull-and-push.md).
* **The shared model is Omni's copy of the base branch.** Omni pulls the base branch into the shared model when a pull request merges or someone commits directly to the base branch. See [Merges and the base branch](https://docs.omni.co/integrations/git/v2/merging.md).

## Why use Git v2

Use Git v2 to:

* **Catch problems before they merge.** Omni checks each pull request and reports the result in GitHub, next to your code review. You can require the checks to pass before a pull request merges. See [Pull request checks](https://docs.omni.co/integrations/git/v2/checks.md).
* **Adopt validation on a model that already has issues.** The validation check counts the issues a pull request adds, and leaves out the issues the shared model already has. See [Validation](https://docs.omni.co/integrations/git/v2/checks.md#validation).
* **Keep the shared model in sync with the base branch.** Omni pulls merged pull requests and direct commits into the shared model, and leaves commits it hasn't pulled unchanged. See [Merges and the base branch](https://docs.omni.co/integrations/git/v2/merging.md).
* **Choose when changes move between Omni and git.** Commits stay in git until you pull them into an Omni branch, and your edits stay in Omni until you push them. See [Pull and push changes](https://docs.omni.co/integrations/git/v2/pull-and-push.md).
* **Resolve conflicts in GitHub.** When edits in Omni conflict with commits in git, you resolve them in a pull request, and Omni keeps your resolution. See [Resolve conflicts](https://docs.omni.co/integrations/git/v2/conflicts.md).

## Supported git providers

> [card] [GitHub](https://docs.omni.co/integrations/git/v2/setup/github.md)

## Next steps

* [Set up Git v2 with GitHub](https://docs.omni.co/integrations/git/v2/setup/github.md)
* [Pull request checks](https://docs.omni.co/integrations/git/v2/checks.md)
* [Configuration file](https://docs.omni.co/integrations/git/v2/config-file.md)
* [Pull and push changes](https://docs.omni.co/integrations/git/v2/pull-and-push.md)
* [Merges and the base branch](https://docs.omni.co/integrations/git/v2/merging.md)
* [Resolve conflicts](https://docs.omni.co/integrations/git/v2/conflicts.md)
* [Git v2 best practices](https://docs.omni.co/integrations/git/v2/best-practices.md)
* [Git v2 settings](https://docs.omni.co/integrations/git/v2/settings.md)
* [Troubleshooting Git v2](https://docs.omni.co/integrations/git/v2/troubleshooting.md)
