Squash my last X commits together using Git

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

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

30条回答
  •  长情又很酷
    2020-11-21 05:33

    If you use TortoiseGit, you can the function Combine to one commit:

    1. Open TortoiseGit context menu
    2. Select Show Log
    3. Mark the relevant commits in the log view
    4. Select Combine to one commit from the context menu

    This function automatically executes all necessary single git steps. Unfortunatly only available for Windows.

提交回复
热议问题