patch

A file listing line-by-line changes to source files, and the patch command that applies or reverses them.

In more detail

Patches are produced by diff or git diff and are a common way to share or apply a change to source files. patch -p1 < file applies one, --dry-run shows what would change without touching anything, and -R reverses it.

Examples

patch -p1 --dry-run < breakages/01-missing-404/break.patch
git log --oneline --patch -1 -- parser.py

Related terms

Taught in

References