docs/sources/as-code/observability-as-code/git-sync/key-concepts.md
{{< admonition type="caution" >}}
Git Sync is now GA for Grafana Cloud, OSS and Enterprise. Refer to Usage and performance limitations to understand usage limits for the different tiers.
Contact Grafana for support or to report any issues you encounter and help us improve this feature.
{{< /admonition >}}
Before you start using Git Sync, understand how the key Git Sync components relate:
A Grafana instance is a running Grafana server. Multiple instances can:
A Git repository is the external storage you want to sync your Grafana instance with. You can organize your Git repository in several ways:
dev/, prod/, or team-a/.main, develop, or team-a.Git Sync repositories support different combinations of repository URL, branch, and path:
repository: your-org/grafana-prod.repository: your-org/grafana-dev.repository: your-org/grafana-manifests, branch: main.repository: your-org/grafana-manifests, branch: develop.repository: your-org/grafana-manifests, branch: main, path: production/.repository: your-org/grafana-manifests, branch: main, path: development/.A repository resource is a Grafana configuration object that defines the connection between a group of repositories and your Grafana instance via Git Sync.
Each repository resource creates bidirectional synchronization between a Grafana instance and a specific location in Git.
A connection is the authentication setup between Grafana and an external Git provider, required when you're not using a Personal Access Token or a static token to authenticate. Use it to authorize access to your external repositories, and to generate or refresh the credentials for Git Sync. A single connection can be reused across multiple repositories.
For example, if you're using GitHub App to authenticate, the connection represents the app installation. Grafana uses this connection to authenticate with GitHub, create access tokens, and authorize repository access on your behalf.
The connection resource includes:
Git Sync is bidirectional, and syncs a repository resource with your Grafana instance. You can modify provisioned resources both from the Grafana UI or from the synced GitHub repository, and changes will be reflected in both places:
You can find the provisioned dashboards organized in folders under Dashboards.
Your Grafana instance can be in one of the following Git Sync states:
Here's an example showing how the repository, branch, and path concepts work together:
Configuration:
your-org/grafana-manifestsmainteam-platform/grafana/In Git (on branch main):
your-org/grafana-manifests/
├── .git/
├── README.md
├── team-platform/
│ └── grafana/
│ ├── cpu-metrics.json ← Synced
│ ├── memory-usage.json ← Synced
│ └── disk-io.json ← Synced
├── team-data/
│ └── grafana/
│ └── pipeline-stats.json ← Not synced (different path)
└── other-files.txt ← Not synced (outside path)
In the Grafana Dashboards view:
Dashboards
└── 📁 grafana-manifests/
├── CPU Metrics Dashboard
├── Memory Usage Dashboard
└── Disk I/O Dashboard
Key takeaways:
team-platform/grafana/).