Formatting and sending patches

Geraldo Netto edited this page Apr 6, 2018 · 6 revisions

You commit locally to your git tree and then prepare patches that you send to the mailing list.

First, make your name and email address are configured for git:

$ git config "Your Name"
$ git config ""

Also configure git to detect renames and copies to make git format-patch output easier to review:

git config --global diff.renames copies

Then, make your modifications in your own private branch:

$ git checkout -b features/foo # branches from master

To commit changes, do:

$ git commit -a -s # commit everything, signoff the patches

Please prepare a commit message for every commit:

The sign-off procedure is explained here:

Once you have commits you want to send out, use git format-patch to generate them.

for a single patch:

$ git format-patch -1

For multiple patches, use:

$ git format-patch -n --cover-letter master

If you need to send more than one revision of the patch, please remember to use patch versioning:

$ git format-patch <-1 | -n --cover-letter master> --subject-prefix="PATCH v2"

Verify the generated patch files and then use git send-email to send them out:

$ git send-email --to 00*.patch

You can find information on how to configure git to use gmail here:

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.