How to combine group of local commits to single push in IDEA?

In IDEA I am trying to push some commits.

I have a requirement that on remote server it looks like single action.

I click to push and see following window 在这里输入图像描述

I expected to see squash checkbox here but don't see it.

Please help me.


You can do it using rebase. Go to VCS/Git/Rebase. Then select Interactive option. It will show you a list of commits, where you can pick which ones you want to squash.

After you hit Start rebasing it will prompt you for a commit message for the squashed commit. After that is done you can push your squashed commit using push dialog.

壁球对话框

More information about rebase in IntelliJ is here.


For me the simplest way with intellij is :

  • Go to Log tab and chose the commit from which you want to squash
  • Right click and select Reset Branch to this commit
  • Choose the mixin options to keep your changes from the commit
  • Commit your changes and don't forget to check the Amend commit option
  • 链接地址: http://www.djcxy.com/p/23542.html

    上一篇: 在重新绑定期间从无意跳过恢复

    下一篇: 如何将一组本地提交与IDEA中的单个推送结合起来?