Git create patch series for multipe commits.

Shawn Bohrer shawn.bohrer at gmail.com
Fri Sep 26 10:18:10 EDT 2014


On Thu, Sep 25, 2014 at 09:54:25PM -0700, Anand Moon wrote:
> Hi All,
> 
> Could somebody provide me steps to create patch series.
First take a look at:

$ git help format-patch
$ git help send-email

Assuming you have basic familarity with git, the typical workflow
would be something like this.

# create a patch series of the commits in the current branch that are
# not in origin/master
$ mkdir patches
$ git format-patch -o patches/ -M --cover-letter origin/master

# Edit the cover letter to describe your patch series
$ edit patches/0000*

# Send the patch series
$ git send-email --to maintainer at domain.org --cc list at mailinglist.com patches/

> How to send version's of these patches.

# Fix up review comments
$ git commit -m "roll back into patch foo"
$ git rebase -i origin/master
# Re-order and squash the fix with patch foo

> How to resend these patches.

# Make v2 patch series
$ git format-patch -o patches/ -M --cover-letter -v 2 origin/master
# Make new cover-letter with description of changes in v2
$ edit patches/0000*
# Good practice to also mention the v2 change in the patches you fixed
$ edit patches/*foo*.patch

Repeat steps above.

--
Shawn



More information about the Kernelnewbies mailing list