How to create patch between two tags with multiple commits between them?

Rishi picture Rishi · Jan 31, 2012 · Viewed 43.4k times · Source

I have two tags in my git in same branch. There are at least 5-6 commits between them. How can I create a single patch between the two tags so that it can be applied to a GitHub repo?

Answer

fajran picture fajran · Jan 31, 2012

You can create a single diff (patch) between two tags using the following

$ git diff tag1 tag2 -- > the-patch.diff

Replace tag1 and tag2 to the tags you want.