rebase to squash multiple commits on same branch

前端 未结 2 1503
执念已碎
执念已碎 2021-02-14 04:55

Can we use rebase to squash multiple commits into one single commit on the same branch?

Taking an example, i have created two topic branches - issueA_1 and issueA_2 from

2条回答
  •  遇见更好的自我
    2021-02-14 05:43

    Yes, the simplest way I find is to do:

    git rebase -i HEAD~3
    

    This will let you review the last 3 commits and you can then squash them.

提交回复
热议问题