Squash my last X commits together using Git

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

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

30条回答
  •  感动是毒
    2020-11-21 05:32

    What can be really convenient:
    Find the commit hash you want to squash on top of, say d43e15.

    Now use

    git reset d43e15
    git commit -am 'new commit name'
    

提交回复
热议问题