I use IntelliJ Idea with Git. When I pull from repository, I get Merge Conflict error.
On the bottom right of IDEA shows merging feature/branch-XXX
after the conflicts.
Now I want to abort this pull(merge).
I could reset the current branch to clean status. I could also abort the merging with TortoiseGit.
But how can I abort the merging conveniently with IDEA?
How do I cancel a git merge? Use git-reset or git merge --abort to cancel a merge that had conflicts. Please note that all the changes will be reset, and this operation cannot be reverted, so make sure to commit or git-stash all your changes before you start a merge.
Revert uncommitted changes You can always undo the changes you've made locally before you commit them: In the Commit tool window Alt+0 , select one or more files that you want to revert, and select Rollback from the context menu, or press Ctrl+Alt+Z .
conveniently? Not yet (Sept. 2018), not before 2019.2 (see below)
This is what issue IDEA-119995 is for.
Git: provide possibility to abort merge process
Before 2019.2, you had to switch to the terminal and type git merge --abort
.
The related issue IDEA-122038 adds in May 2019:
Cherry-pick now is recognized in the same way as rebase and merge, and indicated in the same way - Branch indicator in the status bar shows Cherry-picking in
<branch>
.It is also possible to abort Cherry-pick in the same way - using Abort action in the Branches popup or VCS - Git menu
So the option to abort should be available since IntelliJ IDEA 2019.2.
This is an image for cherry-pick, but it would apply to merge and rebase as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With