What is a diff?
A diff shows exactly what changed in a file. Lines that were added are usually green, and lines that were removed are usually red.
An example
A diff works like tracked changes in a document. After your AI tool edits the home page, the diff shows the one heading it rewrote and the three lines it added.
Where you’ll meet it
- Review what it changed · How to use Claude Code
- Review what it changed · How to use Codex
- Undo a change · How to use Codex
- Review what it changed · How to use Cursor
- Do I need an AI tool to build without learning to code? · Working with an AI agent
- Claude Code, Codex or Cursor: which AI tool fits me? · Working with an AI agent
Related tools
- Claude Code · Ask Claude Code to follow a problem through your project files, explain what it finds, and make a fix you can try.
- Codex · Give Codex a task in your project, such as adding a search box. It can edit the files and run checks, then show you the changes.
- Cursor · Edit code and ask questions in the same window. In Cursor, you can point to a file or a few lines and see the edits the AI suggests.