git format-patch -3 --stdout | git am -3

Category: Git - Advanced

git format-patch -3 --stdout | git am -3

Stream a patch series and apply it

The left side prints the last three commits as one patch stream; the right side applies them with three-way merging where needed. The -3 on am falls back to a three-way merge against the original blobs when a patch does not apply cleanly. This is the classic email-based contribution pipeline.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.