ZANARDI Bruno

Software Developper

About
Resume

Git Blog

Git command `format-patch`

Definition

Prepare patches for e-mail submission.

Expert usage

Create a patch with the {x} last commits

$ git format-patch -{x} HEAD --stdout > <name>.patch

Create a patch with commits since the parent of <hash> (excluded):

$ git format-patch <hash>^ --stdout > <name>.patch

Create a patch with commits since branch start:

$ git format-patch <parent_branch> --stdout > <name>.patch