Git

git apply

CautionApply raw diffs

git apply <file.patch>

Applies plain diffs; --check dry-runs, --3way falls back to merge on conflicts. For history-less diffs.

Examples

  • git apply --check fix.patchVerify it applies cleanly

Syntax

git apply [--check] [--3way] <patch>

Before you run it

Review before committing applied changes.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store