Git Sync

A bi-directional Git integration

With GitBook you can synchronize your content with GitHub or GitLab repositories and keep your content consistently up-to-date.

GitHub: How it works

  1. 1.
    Add the GitBook App to your GitHub account or organization.
  2. 2.
    You link your GitBook space to a GitHub repository.
  3. 3.
    You select the branch you care about.
  4. 4.
    GitBook changes are synced to GitHub as commits, GitHub changes are synced to GitBook as history commits.
Full GitHub sync instructions:

GitLab: How it works

  1. 1.
    Generate an API token in GitLab and add it to your GitBook space
  2. 2.
    You link your GitBook space to a GitLab repository.
  3. 3.
    You select the branch you care about.
  4. 4.
    GitBook changes are synced to GitLab as commits, GitLab changes are synced to GitBook as history commits.
Full GitLab setup instructions:
Last modified 1mo ago