git interactive rebase squash into next commit

后端 未结 4 1107
一个人的身影
一个人的身影 2021-02-13 21:59

In Git I can use an interactive rebase to re-write history, this is great because in my feature branch I made a ton of commits with partially working code as I explored differen

4条回答
  •  日久生厌
    2021-02-13 22:20

    What you want is:

    1. pick
    2. squash
    3. fixup
    4. pick
    5. squash
    6. squash
    7. fixup
    

    Then when the new combined commits come up in the editor delete the lines for the picked commits and leave the fixups. The resulting feature-patches should have the commit message from the last commit in the series that way.

提交回复
热议问题