Edit in Docsheaf or in your repository
Two-way sync with GitHub keeps a space and a folder of Markdown in step — writers use the editor, developers push commits.
How it works
Two-way sync
Pushes to the branch update the space, and merged change requests and live edits are committed back to the repository.
GitHub App
Install the Docsheaf GitHub App on the repositories you choose, then pick a branch and a folder for each space.
Readable Markdown
One file per page with front matter, SUMMARY.md and images in .gitbook/assets — GitBook’s layout, with blocks written as GitBook-style tags.
Conflicts go to review
When the repository and the space both changed, the push opens a change request with a three-way merge instead of overwriting anything.
Locked spaces stay locked
In a space that requires change requests, pushes arrive as a change request for review.
GitLab
Sync with GitLab repositories.
Markdown everywhere
Git Sync uses the same round-trip-tested converter as Markdown import and export.
Import Markdown
Paste Markdown or upload .md files in the editor, or send them to the import API.
Learn moreExport every page
Download a whole space as Markdown in GitBook’s layout (SUMMARY.md, folders, images), or read any page as Markdown from the published site or the API.
Learn moreScript it
Push Markdown from CI into a change request with the REST API.
Learn moreFrequently asked questions
Which Git providers are supported?
GitHub, through a GitHub App that you install on the repositories you choose. GitLab is on the roadmap.
What happens when both sides change?
If the space changed since the last sync, or requires change requests, a push opens a change request instead of updating the space. You review it on a diff and resolve conflicting pages with the usual merge.
How often are edits committed?
Each merged change request becomes a commit as soon as it is merged. Edits made directly in a live space are committed with the space’s history snapshots, which are recorded as you keep editing, no more than one every ten minutes. Commits carry the name of the person who made the change.
Can I bring an existing GitBook repository?
Yes. Connect the space and choose to import from GitHub first: SUMMARY.md, nested pages, front matter, images and GitBook’s hint, tab, stepper and code tags are read into the space, and the file names are kept when Docsheaf writes back.
Connect your repository
Install the GitHub App, pick a folder, and keep writing wherever you prefer.