git create commit from diff between two branches

后端 未结 3 1779
终归单人心
终归单人心 2021-01-30 00:57

I have two branches which have very little similar history, but are related to each other.

I want the changes between those two in one git commit.

3条回答
  •  太阳男子
    2021-01-30 01:16

    A simple way to do it is:

    • create and checkout branch tmp at branch_a (git branch tmp branch_a && git checkout tmp)
    • git reset --soft branch_b
    • git commit

    that commit must have all the diff

提交回复
热议问题