git sync
Keep your docs and your codebase in sync
Synchronize GitBook with GitHub or GitLab using a two-way Git sync, so developers and writers can contribute through the tools and workflows they already use

How Git Sync works
Connect GitBook to GitHub or GitLab, then edit, review, and publish from either side while your content stays in sync.
01
Connect GitBook to a GitHub or GitLab repository
02
Edit Markdown in your repo or in GitBook’s visual editor
03
Use branches, reviews, and merge rules to control what’s published
04
Changes stay in sync across GitBook and your repository
Integrate with your
Git workflows
GitHub & GitLab Sync
Synchronize your GitBook docs with GitHub or GitLab with GitBook’s bi-directional integration
FAQs
What is Git Sync?
Git Sync connects GitBook to a GitHub or GitLab repository using a two-way sync, so teams can edit content in GitBook or directly in their repository.
Does GitBook support docs-as-code workflows?
Yes. Developers can write and edit Markdown in GitHub or GitLab while other contributors work in GitBook’s visual editor. Changes stay synchronized across both environments.
Can I use Git branches and pull-request-style workflows?
Yes. GitBook supports branch-based workflows, reviews, merge permissions, and Git-based collaboration so documentation changes can follow a process similar to code changes.
Can I import existing documentation via GitHub or GitLab into GitBook?
Yes. You can connect an existing repository and import your current Markdown content into GitBook, then keep the repository and GitBook synchronized.
Do developers have to leave their code editor to update GitBook?
No. With Git Sync, developers can contribute to documentation directly from the code editor and Git workflow they already use, while technical writers and other contributors can work in GitBook.












