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 on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store