> 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/documentation/ja-gitbook-documentation/docs-as-code/git-sync.md).

# GitHub & GitLab Sync

<figure><img src="/files/a45190fa3c4461a7d07db5ae4b5ccee23235598e" alt="A GitBook screenshot showing the Git Sync setup"><figcaption><p>GitBook のドキュメント用に Git Sync をセットアップします。</p></figcaption></figure>

### 概要

Git Sync を使うと、技術チームは GitHub または GitLab のリポジトリを GitBook と同期し、Markdown ファイルのリポジトリを美しく使いやすいドキュメントに変換できます。GitHub または GitLab 上のコードベースとコンテンツを同期したまま、GitBook の強力なエディタで直接編集できます。

Git Sync は双方向なので、GitBook のエディタで直接行った変更は自動的に同期され、GitHub または GitLab で行われたコミットも同様に同期されます。これにより、開発者は GitHub または GitLab から直接コミットでき、テクニカルライター、インストラクショナルデザイナー、プロダクトマネージャーは GitBook で直接変更を編集し、議論し、フィードバックできます。

### Git Sync をセットアップ

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-github">:github:</i></h4></td><td><h4>GitHub Sync をセットアップ</h4></td><td>GitBook 用の GitHub 連携を設定し、認証します。</td><td><a href="/pages/9f5c91631cf2369237bfc9cadc5d6ef254c671ec">/pages/9f5c91631cf2369237bfc9cadc5d6ef254c671ec</a></td></tr><tr><td><h4><i class="fa-gitlab">:gitlab:</i></h4></td><td><h4>GitLab Sync をセットアップ</h4></td><td>GitBook 用の GitLab 連携を設定し、認証します。</td><td><a href="/pages/2412e61c03b4eef526a7b8f80a198593d8a933d1">/pages/2412e61c03b4eef526a7b8f80a198593d8a933d1</a></td></tr></tbody></table>

{% hint style="info" %}
Git Sync はエンタープライズのお客様向けに IP 許可リストをサポートしています。GitHub、GitLab、または社内ネットワークが承認済み IP からのトラフィックのみを受け入れる場合は、連携を有効にする前に、これらの Git Sync の送信 IP を許可リストに追加してください:

* `34.136.22.210`
* `34.29.189.57`
* `35.223.181.150`
* `34.72.115.112`
* `136.116.236.109`
  {% endhint %}

{% hint style="info" %}
のみ [管理者と作成者](/docs/documentation/ja-gitbook-documentation/gong-tong-zuo-ye/member-management/roles.md) が Git Sync を有効化および設定できます。
{% endhint %}

### AI エージェントとの作業

Git Sync を使ってローカルでドキュメント作業を行うときは、GitBook の [skill.md ファイル](/docs/documentation/ja-gitbook-documentation/docs-as-code/ai-coding-assistants-and-skillmd.md) を使って、GitBook のブロック、機能、ベストプラクティスに関するコンテキストを AI コーディングアシスタントに提供できます。

に移動します [Agent skills](/docs/documentation/ja-gitbook-documentation/docs-as-code/ai-coding-assistants-and-skillmd.md) 詳細については。


---

# 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/documentation/ja-gitbook-documentation/docs-as-code/git-sync.md?ask=<question>&goal=<endgoal>
```

`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.
