> 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/commits.md).

# コミットメッセージと自動リンク

デフォルトでは、GitBook から Git リポジトリへコンテンツをエクスポートする際、GitBook はマージされた変更リクエストに基づいてコミットメッセージを生成します:

```
GITBOOK-14: ユーザー管理に関するドキュメントを改善
```

## 自動リンク `GITBOOK-<num>` GitHub と GitLab で

GitBook の変更リクエスト ID を自動的に解決したい場合（例: *GITBOOK-123*）をコミット内のリンクに変換するには、GitHub の *自動リンク参照* 機能を使って有効化できます。手順については [GitHub](https://help.github.com/en/github/administering-a-repository/configuring-autolinks-to-reference-external-resources).

次の URL 形式を使用してください。ここで `spaceId` はセクションの URL に対応します:

`<https://app.gitbook.com/s/{spaceId}/~/changes/<num>/`

<div data-full-width="false"><figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FXMOX8gtwZIZGwdSWhSdX%2Fgitsync-autolink%402x.png?alt=media&amp;token=bebbbb78-1a5f-4e90-af21-29803b3d2a7a" alt="A GitBook screenshot showing autolink setup"><figcaption><p>自動リンクの設定。</p></figcaption></figure></div>

## コミットメッセージのテンプレートをカスタマイズする

GitBook を [monorepo](/docs/documentation/ja-gitbook-documentation/docs-as-code/git-sync/monorepos.md)と一緒に使用している場合、またはコミットメッセージに特定のガイドラインがある場合は、Git にコミットをプッシュする際に GitBook が使用するメッセージをカスタマイズしたいかもしれません。

テンプレートには次のプレースホルダーを含めることができます:

* `{change_request_number}` 変更リクエストの一意の数値 ID
* `{change_request_subject}` マージ時の変更リクエストの件名、または `件名なし` 何も指定されていない場合。

デフォルトのテンプレートは次のとおりです:

```
GITBOOK-{change_request_number}: {change_request_subject}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/docs-as-code/git-sync/commits.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
