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

# コミットメッセージ & Autolink

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

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

## オートリンク `GITBOOK-<num>` GitHub と GitLab で

GitBook の変更リクエスト ID（例: *GITBOOK-123*）をコミット内でリンクに自動的に解決したい場合は、GitHub の *Autolink references* 機能を有効にできます。手順は [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="/files/5c32c74ce1076e5ef38b97f6417c4a4c01bf0b86" alt="A GitBook screenshot showing autolink setup"><figcaption><p>オートリンクの設定。</p></figcaption></figure></div>

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

GitBook を [モノレポ](/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 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/commits.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.
