> 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/zh/chuang-jian-nei-rong/version-control.md).

# 版本控制

您可以使用……来监控人们对您的内容所做的所有更改 **版本历史** 侧边栏面板中切换它。

### 版本历史 <a href="#see-the-activity-of-a-specific-draft" id="see-the-activity-of-a-specific-draft"></a>

在某个章节的版本历史中，您可以看到所有更改其中内容的操作列表。这些包括：

* 当有人对该章节进行了实时编辑时。
* 当有人合并了一个变更请求时。
* 当有人执行了 Git 同步操作时。

### 查看内容的历史版本

要查看内容的过往版本并了解所做的更改，请点击 **版本历史** <picture><source srcset="/files/WVfSPMgIbWWq12Hy83TC" media="(prefers-color-scheme: dark)"><img src="/files/aa0c59dd27f79ad3cdc857a47d9ea0b0f1eabbaa" alt="The Version history icon in GitBook"></picture> 按钮，位于章节标题中，或打开 **操作菜单** <picture><source srcset="/files/HXFvPsjDqbaBEhpH0WKJ" media="(prefers-color-scheme: dark)"><img src="/files/950d2c0e21d4aa4c603de07a2bc5d827c0d5cbde" alt="The Actions menu icon in GitBook"></picture> 位于章节或变更请求标题旁的，点击 **版本历史**.

点击列表中的任意项，即可查看在该更改发生时您的内容呈现的样子。这与您查看变更请求的方式非常相似。

### 显示更改

在查看内容的旧版本时，您可以选择高亮显示旧内容与当前内容之间的差异——类似于变更请求中的差异视图。

要启用或禁用此功能，请使用 **显示更改** 底部的切换开关 **版本历史** 侧边栏面板中切换它。

启用“显示更改”后，已更改的内容会在其内容块左侧以图标高亮显示。

### 查看历史发布版本

如果您正在查看已发布章节的版本历史，您还可以在已发布上下文中查看之前版本的预览效果（即最终用户会看到的内容）。

您可以通过以下方式进行：

{% stepper %}
{% step %}
在版本历史侧边栏中，选择该修订版本
{% endstep %}

{% step %}
复制 URL 末尾的 ID
{% endstep %}

{% step %}
将其添加到您已发布文档 URL 的末尾，如 `/~/revisions/<id>`
{% endstep %}
{% endstepper %}

### 回滚到较早版本

回滚允许您将章节内容恢复到之前某个时间点的状态。如果您不小心做了破坏性更改，或删除了内容，并且需要快速恢复到该章节的先前版本，这将非常有帮助。

要回滚到您章节的较早版本，请将鼠标悬停在侧边栏中的该版本上，然后点击 **操作按钮** <picture><source srcset="/files/YjlF3Z9KMYv9aQiFzZKD" media="(prefers-color-scheme: dark)"><img src="/files/d05670ba93b683794fb3fe95a9fc7ab5c7fceafd" alt="The Actions menu icon in GitBook"></picture> 并点击 **回滚**.


---

# 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/zh/chuang-jian-nei-rong/version-control.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.
