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.
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.
HEAD~3
can be used to select the last 3 commits. –
Escapade HEAD~2
notation to work with last two commits. That worked like a charm. #35019204 –
Trimorphism There is a new way:
Version Control -> Log -> Right click on the commit -> Interactively rebase from here
and then you can choose to pick/squash the rest of commits.
For me, the simplest way with IntelliJ is:
Log
tab and choose the commit from which you want to squashReset Branch to this commit
Soft Or Mixin
options to keep your changes from the commitAmend commit
optionSoft
option instead of Mixed
to have all changes already staged for commit. –
Barnie With the latest version of IntelliJ you can simply select all the commits, right-click -> Squash commits
© 2022 - 2024 — McMap. All rights reserved.