Git: generate and apply patch from commit

Creating

git format-patch -n commit-id

E.g.
$ git format-patch -1 HEAD
$ git format-patch -2 86c5960

Applying

git am < patch

More: http://stackoverflow.com/questions/6658313/generate-a-git-patch-for-a-specific-commit

Advertisements

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