How it works...

As we saw in the previous examples, git format-patch creates the patch files in the Unix mbox format, so only a little extra effort is required to allow Git to send the patch as an email. When sending emails with git send-email, make sure your Mail User Agent (MUA) does not break the lines in the patch files, replace tabs with spaces, and so on. You can test this easily by sending a patch to yourself and checking whether it can be applied cleanly to your repository.

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.