> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/docs-as-code/git-sync.md).
# GitHub & GitLab Sync
Synchronize your GitBook docs with GitHub or GitLab with GitBookâs bi-directional integration
Set up Git Sync for your GitBook docs.
### Overview
Git Sync allows technical teams to sync GitHub or GitLab repositories with GitBook and turn a repo of Markdown files into beautiful, user-friendly docs. Edit directly in GitBookâs powerful editor while keeping content synchronized with your codebase on GitHub or GitLab.
Git Sync is bi-directional, so changes you make directly in GitBookâs editor are automatically synced, as are any commits made on GitHub or GitLab. This allows developers to commit directly from GitHub or GitLab and technical writers, instructional designers, and product managers to edit, discuss and feedback changes directly in GitBook.
### Set up Git Sync
:github:
Set up GitHub Sync
Set up and authorize the GitHub integration for GitBook.
{% hint style="info" %}
Git Sync supports IP allowlisting for Enterprise customers. If your GitHub, GitLab, or internal network only accepts traffic from approved IPs, allowlist these outbound Git Sync IPs before you enable the integration:
* `34.136.22.210`
* `34.29.189.57`
* `35.223.181.150`
* `34.72.115.112`
* `136.116.236.109`
{% endhint %}
{% hint style="info" %}
Only [administrators and creators](/docs/collaborate/member-management/roles.md) can enable and configure Git Sync.
{% endhint %}
### Working with AI Agents
When working on your docs locally with Git Sync, you can use GitBook's [skill.md file](/docs/docs-as-code/ai-coding-assistants-and-skillmd.md) to provide an AI coding assistant with context about GitBook's blocks, features, and best practices.
Head to [Agent skills](/docs/docs-as-code/ai-coding-assistants-and-skillmd.md) to learn more.
---
# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.
## 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, and the optional `goal` query parameter:
```
GET https://gitbook.com/docs/docs-as-code/git-sync.md?ask=&goal=
```
`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.
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.