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

后端 未结 2 867
-上瘾入骨i
-上瘾入骨i 2020-12-24 04:53

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 Gi

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-24 05:30

    You can create a single patch for multiple commits by using the --stdout option and directing the output to a file:

    git checkout tag2
    git format-patch tag1 --stdout > patch1to2.patch
    

提交回复
热议问题