Squash my last X commits together using Git

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

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

30条回答
  •  北恋
    北恋 (楼主)
    2020-11-21 05:51

    If you don't care about the commit messages of the in-between commits, you can use

    git reset --mixed 
    git commit -a --amend
    

提交回复
热议问题