# Version Control

Dot can sync the files it manages — notes, table documentation, relationships, custom skills, reports — with a Git repository. Pick the provider you already use:

* [**GitHub**](/train-dot/version-control/github.md) — install the Dot Context Sync GitHub App and pick a repo. Webhooks are auto-created for you.
* [**GitLab**](/train-dot/version-control/gitlab.md) — paste a Personal Access Token (gitlab.com or self-hosted). Webhook is set up manually with a URL and secret Dot displays for you.

You can connect both providers at the same time — every change in Dot fans out to all configured repos in parallel, and webhook events from any provider pull changes back into Dot.

## Why version-control your context

Your context lives in plain Markdown and YAML files. Keeping it in Git gives you:

* **Audit trail** — every change is a commit. `git blame` shows who changed which note and why.
* **Backup + disaster recovery** — restore an accidentally deleted note with `git revert`, or rebuild a fresh server from the repo.
* **AI/coding-agent interop** — Claude Code, Cursor, and GitHub Copilot can read and contribute to the same context Dot uses.
* **Code review** — important notes and skills go through PR review before reaching production.
* **Cross-environment promotion** — point staging at `dev` and prod at `main` of the same repo, then promote with a PR.
* **Bulk edits in your editor** — power users grep/sed across hundreds of notes locally, push, and Dot picks up the changes.

## What gets synced

```
notes/
├── active/          # Active notes
└── inactive/        # Archived notes

data_sources/
├── active/          # Active table documentation
└── inactive/        # Archived table documentation

relationships.yaml   # Table relationships
reports/             # Saved reports
skills/              # Custom skills
```

All files use Markdown (`.md`) with YAML frontmatter, or plain YAML.

{% hint style="info" %}
Only context files are synced. Database connections, user accounts, chat history, schedules, and billing settings stay in Dot.
{% endhint %}

## Workspaces

Each org and each workspace has its own independent connection — switching to a workspace shows the empty Connect panel even if the parent org is connected. This lets you keep separate workspaces pointing at separate repos (or no repo at all).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getdot.ai/train-dot/version-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
