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

# Repository structure for content in git

> Learn where Omni writes dashboards and apps that require a pull request to publish in your git repository and what each file contains.

> [!NOTE]
>
> This feature is currently in beta. Reach out to Omni support to have it enabled for your organization.

When a document's [**Require pull requests to publish**](https://docs.omni.co/content/develop/branch-mode.md#requiring-pull-requests-to-publish-document-changes) setting routes its changes through git, Omni writes the document's files into `omni/content/` at the root of the connected repository. Omni always uses this folder, regardless of where the model's own files are stored. All models that share a repository share this folder.

Omni is the source of truth. Changes to these files in git don't sync back into Omni. For requirements and limitations, refer to [Content in git](https://docs.omni.co/integrations/git/content).

## Folder structure

```text highlight={4-6,17,20} theme={null}
omni/
├── content/
│   ├── spaces/
│   │   └── hub/
│   │       └── <omni-folder-path>/
│   │           └── @<identifier>/
│   │               ├── document.json
│   │               ├── app/
│   │               │   ├── index.html
│   │               │   └── settings.json
│   │               ├── workbook-model/
│   │               │   └── <file>.yaml
│   │               └── query-models/
│   │                   └── <tab-key>/
│   │                       └── <file>.yaml
│   └── users/
│       └── <user-id>/
│           └── <omni-folder-path>/
│               └── @<identifier>/
└── <model>/
```

* `hub` is the shared space the document belongs to.
* `<omni-folder-path>` mirrors the document's folder path in Omni. Moving a document to a different folder in Omni moves its files in git.
* `@<identifier>` is the document's folder: an `@` followed by the document's identifier, the ID in the document's URL.
* `<user-id>` is the user ID of the owner of a personal folder.
* `<model>/` is the model's own folder. Its location comes from the model's [model path](https://docs.omni.co/integrations/git/settings.md#model-path), which defaults to `omni/<model-name>`. A custom model path cannot be the repository root, `omni`, or a folder inside `omni/content`, because the model's files and the document files would overwrite each other. Refer to [Troubleshooting](https://docs.omni.co/integrations/git/content/troubleshooting.md) for what happens if it is.

## File contents

| File or folder | Description |
| - | - |
| `document.json` | The document in the same format the [documents v2 API](https://docs.omni.co/api/documents-v2/get-document-state.md) returns, formatted so two versions diff cleanly. Values that change on every draft are left out. |
| `app/index.html` and `app/settings.json` | The HTML and settings of an [app](https://docs.omni.co/visualize-present/apps). Only present for apps. |
| `workbook-model/` | The document's own model changes, such as fields added in the workbook. A document without any workbook model changes won't have this folder. |
| `query-models/<tab-key>/` | One folder per workbook tab that has its own query model. The folder is named after the tab's key, so the path doesn't change if the tab is renamed. |

## Folder names

Folder names in git use letters, numbers, and hyphens only. If a folder name in Omni contains other characters, it may be different in git.

A document's folder doesn't specify which model it belongs to, because all models in a repository share one `omni/content/` folder.

## Next steps

* [Syncing content to git](https://docs.omni.co/integrations/git/content/sync-to-git.md) - Learn how an Omni draft becomes a pull request
* [Troubleshooting](https://docs.omni.co/integrations/git/content/troubleshooting.md) - Get help with blocked commits and stand-in files


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.