Product SiteDocumentation Site

1.6.3. Submission Via Formatted Patches

Formatted patches are very similar to file diffs generated by other tools or source control systems, but contain far more information, including your name and email address, and for every commit in the set, the commit's timestamp, message, author, and more. They allow anyone to import the enclosed changesets directly into Git, where all of the commit information is preserved.
Assuming that you have an existing local that you've kept up to date with master as described in Section 1.4, “Preparing Feature Branches” currently checked out, generating a formatted patch set should be relatively straightforward, using an appropriate filename as the target of the patch set:
git format-patch --binary --stdout origin/master..HEAD > feature_branch.patch
Once you've generated the formatted patch file, you can easily attach it to a bug report, or even use the patch file as an email to send to the developer mailing list. Developers, or other users, can then import this patch set into their local repositories using the following command, again substituting the appropriate filename:
git am --signoff feature_branch.patch