O
AI-generated image

diff

/dɪf/ noun, verb · British & US
Valid in UKValid in US
Share WhatsApp

What does diff mean?

"Diff" is a compact, informal term that originated in computing and has since spread widely through technical and everyday language. As a noun, a diff is a record or display of the differences between two versions of a file, document, or body of code — the output produced when the two are compared line by line. As a verb, to diff two things means to run exactly such a comparison. The word derives from diff, a classic Unix utility first released in the early 1970s, whose name was itself an abbreviation of "difference." Because version control systems like Git place diffs at the heart of collaborative work — every code review, merge, and patch is expressed as one — the term has become indispensable vocabulary for programmers. In casual British and Australian speech, diff can also serve as a simple clipped form of "difference," though this sense is unrelated to the technical usage in spirit if not in origin.

noun

A record or display of the differences between two versions of a file, text, or set of code.

Example

"He attached the diff to the bug report so the maintainers could see exactly what he had changed."

noun

Informal, chiefly British and Australian: a difference or disagreement.

Example

"They settled their diffs over a pint and moved on."

verb

To compare two versions of a file or text in order to identify the differences between them.

Example

"Diff the old spec against the new one before you start rewriting the tests."

Plural diffs

Regular plural, used when referring to multiple records of changes or multiple comparisons.

Example

"The release notes summarized all the diffs merged since the last build."

Did you know?

The word 'diff' comes straight from the name of a Unix program written in the early 1970s — software history so influential it turned a command into everyday vocabulary.

Reviewed by Deb Chak, Editor. AI-assisted content curated by RJS Tech Solutions LLP.

Etymology of diff

"Diff" began life as the name of a Unix command-line utility, diff, created by Douglas McIlroy and released with early versions of Unix in the early 1970s; its name was a straightforward abbreviation of "difference." The program compared files line by line and printed their discrepancies, and over time the tool's name became a generic term for both the act of comparing versions and the resulting record of changes. The underlying root is Latin differre, meaning "to carry apart" or "to differ," shared with words like different, differentiate, and indifferent. By the 1980s and 1990s the noun and verb senses were well established among programmers, and today they are reinforced by ubiquitous use in version control systems such as Git.

Related word forms

How diff is actually used

"Diff" is informal-to-neutral register, firmly rooted in software engineering and Unix culture; outside technical circles it can sound jargonistic. As a verb it is standard among developers but not yet universal in general prose. The casual noun sense meaning simply "a difference" is chiefly British and Australian colloquial speech.

Easily confused with diff

differ

"Differ" is a full verb meaning to be unlike or disagree with something, while "diff" is an informal technical term for comparing two versions or the record of differences produced by that comparison.

What's another word for diff?

Words and phrases paired with diff

code review diffgenerate a diffapply a patch from a diffdiff between two versions

Rhymes with diff