> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/latex/zh-cn/zhi-shi-ku/124-rejecting-changes-how-to-revert-a-chunk-on-overleaf.md).

# 拒绝更改：如何在 Overleaf 中“回退一个代码块”

![在 Overleaf 中通过比较模式还原一个更改块 - 动画 GIF](/files/4ed2cb2a3a3061c91cc200cd0110edb1c64cd196)

你可能已经知道， [版本历史功能](https://www.overleaf.com/blog/194-new-year-new-name-new-free-features#!compare) 在 Overleaf 中可以用来保存项目的里程碑版本。为这些里程碑添加特定标签后，你就可以使用 VERSIONS 菜单下的“restore”选项轻松恢复之前保存的版本。

![在 Overleaf 中使用版本菜单](/files/c89e869c1c916ada54db3809a0c509fa3627bbc7)

你甚至可能知道，你可以使用已保存版本右侧的“compare”功能，跟踪项目当前状态与之前保存版本之间的变化。

但你知道你还可以还原 *特定更改（'chunks'）* 到之前的版本——也许是为了拒绝某位合著者所做的某些更改，或者撤销最近一行有误的代码，同时保留其他编辑？这实际上让你可以把合著者的修订视为建议，并将“compare mode”当作“suggest mode”来接受或拒绝它们。

![在 Overleaf 中通过比较模式还原一个更改块](/files/1ec2be1f60a87e894c966b9c9ae41ef037ad9cf5)

当你处于 compare mode 时，你会看到当前版本（左侧）和用于比较的已保存版本（右侧）中对应的更改块。你可以通过保持不变来接受每个更改块，或者点击新旧版本之间的“revert chunk”箭头来拒绝它（上方亮粉色箭头已标出）。只要记得在看完更改后再次点击 COMPARE 按钮退出 compare mode 即可！


---

# 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://ayakaleaf-pro.ayaka.space/latex/zh-cn/zhi-shi-ku/124-rejecting-changes-how-to-revert-a-chunk-on-overleaf.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.
