跳到主要内容Skip to main content

差异对比Diff

Diff

  • AI 编程AI coding
  • 第三站 · 用深Station 3 · Going Deeper
解决什么问题What problem it solves

看 AI 到底改了什么。这是接受 AI 代码最关键的一步。See exactly what the AI changed — the most important step when accepting AI-written code.

这是什么What it is

逐行比较改动前后的差异,是审查 AI 产出的基本手段。

Comparing before and after line by line, the basic means of reviewing AI output.

为什么需要知道Why it matters

官方资料里有个反复出现的模式。AI 的改动始终保持在版本控制里、可 diff 可撤销。这是安全前提。A pattern that recurs in official guidance: keep AI changes under version control, diffable and revertible. That is a precondition for safety.

出处Sources
  • Aider 的 Git 集成设计Aider's Git integration ↗