JAEN

Git

git format-patch / am

SafeMake and apply patches

git format-patch -1 <commit>

Exports commits as patch files and re-applies them with am — move changes across air gaps.

Examples

  • git format-patch -3 HEAD && git am *.patchCarry the last three commits

Syntax

git format-patch [-n] <rev> / git am <patch>

Before you run it

Files in, commits out.

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