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