This feature is currently in beta. Reach out to Omni support to have it enabled for your organization.
Before you begin
Omni only commits a document to git when the document requires a pull request to publish. To set this up:- Enable Require pull requests to publish under Settings > Content Permissions. You need Organization Admin permissions.
- Open the document and enable Require pull requests to publish under File > Document settings. You need the Manager role on the document.
Publishing documents through pull requests
- Open the document and click Edit. Omni will ask you to make the change on a branch. Pick an existing branch or create a new one.
- Make your changes. The branch header shows that the document needs a pull request before the draft can be published.
- When you’re ready, click Create pull request in the branch header, then commit the branch or open the pull request. Either action writes the document files to the branch.
- Omni fetches the content changes and writes the diffs into
omni/content/on the branch. Model changes on the same branch are committed alongside them. - In your git provider, the pull request diff shows the changed model and document files together. See Repository structure for content in git for more information about the files’ contents and overall structure.
- When the pull request is merged, Omni publishes the draft and the base branch reflects the published version that document.
Discarding and moving drafts
- If you discard a draft on an active branch, Omni will discard the diffs in git to reflect the published state of the document.
- A document that doesn’t have a draft on the branch keeps the folder it has on the base branch.
How Omni keeps the base branch current
Omni runs background syncs to the base branch to check that what’s stored in git matches with Omni’s current state. For documents, it checks that every document that requires a pull request has up-to-date files inomni/content/. It then:
- Adds files for documents that are missing from the repository
- Refreshes files for documents whose published version has changed
- Moves files for documents that moved to a different Omni folder
- Removes files for documents that no longer require a pull request
If Require for system syncs is enabled for the model, Omni doesn’t directly commit document file changes to the base branch. A pull request is required to merge the changes.
Next steps
- Repository structure - Learn how Omni structures content committed to git
- Troubleshooting - Get help with blocked commits and stand-in files

