How to generate patch of commit in Git

You have cloned an online Git repository, ran into a bug, found the cause, fixed it and committed it. Now, you want to submit the patch of the fix to the maintainer. The Git incantation to do this is:

git format-patch origin/master

This creates a patch file that the maintainer can pull into his Git repository.

Tried with: Git 1.7.4

Advertisements

One thought on “How to generate patch of commit in Git”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s