Squash my last X commits together using Git

前端 未结 30 3514
醉酒成梦
醉酒成梦 2020-11-21 05:17

How can I squash my last X commits together into one commit using Git?

30条回答
  •  闹比i
    闹比i (楼主)
    2020-11-21 05:34

    git rebase -i HEAD^^
    

    where the number of ^'s is X

    (in this case, squash the two last commits)

提交回复
热议问题