# Diff

> A line-by-line view of what changed in a file: removed lines in red, added lines in green.

**Category:** ChatGPT

**A diff shows exactly what changed, and nothing else.** Instead of comparing two versions of a file by eye, you see the removed lines and the added lines side by side or one under the other.

In [Codex](/glossary#codex), every change comes as a diff so you can review it before you keep it. You don't need to understand every line. Check three things: are the changed files the ones you expected, is the change about the size you expected, and did the tests pass?

## At work

Codex reports "done" on a small fix but the diff touches twelve files? That's your cue to ask why before you keep anything.

## Often confused with

A commit. A diff shows the change; a commit saves it into the project's history in Git.

## Related terms

- Codex
- Sandbox
- AGENTS.md

## See it in a lesson

[Codex](/en/learn/chatgpt/advanced/codex)

## Further reading

- [Diff (Wikipedia)](https://en.wikipedia.org/wiki/Diff): Background on how diffs work.
- [Codex code review (ChatGPT Learn)](https://learn.chatgpt.com/codex/code-review): Reviewing changes with Codex.
- [Codex CLI (ChatGPT Learn)](https://learn.chatgpt.com/codex/cli): The /review command for your changes.

---

Last updated: 14/10/2026  
Source: Rollo Academy glossary
