Git Sync
Keep your SpecDown docs in sync with a GitHub or GitLab repository. Every save becomes a commit; every push triggers a pull.
Connecting a Repository
- Go to Project Settings → Git Integration.
- Choose your provider: GitHub or GitLab.
- Enter your repository URL (e.g.
https://github.com/org/repo). - Generate a Personal Access Token (PAT) with repo read/write permissions.
- Paste the PAT into the token field and click Connect.
PAT Permissions Required
repo(read & write)workflow(optional, for CI)
read_repositorywrite_repository
How Sync Works
After connecting, SpecDown syncs your documents as follows:
- On save: SpecDown commits the document to the configured branch using the document's
full_pathas the file path, with a.mdextension. - On push: If your repository receives new commits, SpecDown pulls the changes and updates the corresponding documents.
- Conflict handling: Last write wins. If the same file is updated in both SpecDown and Git simultaneously, the most recent change prevails.
Branch Configuration
By default SpecDown syncs to the main branch. You can change this in Project Settings → Git Integration → Target Branch.
A typical document at path guides/api/auth is committed as:
docs/guides/api/auth.mdCommit Messages
Commits follow this format:
docs(specdown): update "Authentication Guide"
Updated via SpecDown editor
User: user@example.com
Project: my-api-docsWebhooks (Incoming Sync)
To enable automatic pull when your repo receives pushes, set up a webhook in your Git provider pointing to:
https://specdown.app/api/webhooks/gitSet the Content-Type to application/json and use the webhook secret shown in your project settings to sign payloads.
Sync Logs
Every sync operation (push or pull) is logged in Project Settings → Git Logs. Logs include the commit SHA, timestamp, status (success / error), and any error messages.
This makes it easy to debug sync issues without leaving SpecDown.
Disconnecting
To disconnect Git sync, go to Project Settings → Git Integration and click Disconnect. Your existing documents are not affected — only future sync is stopped. The PAT is immediately deleted from the database.
Ready to get started?
Write specs like code. Sync with Git. Share with your team.