Create and Apply Git Patches

From NovaOrdis Knowledge Base
Revision as of 21:49, 16 January 2024 by Ovidiu (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

Internal

Overview

Patches can be created with git format-patch and applied with git am or git apply.

Create the Patch

Specify how many commits from head to include in the patch:

git format-patch -<n> --stdout > ./file.patch