20

I want to disable Auto-Commit on Merge on Intellij Idea when Branch is merged from Branch Dialog as shown below.

enter image description here

I'm aware that if we use Merge Branch Dialog I have a option for No Commit.

enter image description here

Can I disable auto-commit on merge, when I merge branch from Branch View Dialog?

A0__oN
  • 8,740
  • 6
  • 40
  • 61
  • I don't see a way within IDEA, but you may want to also look at [defaulting no-commit mode in general](https://stackoverflow.com/q/24660529/65839), which has a couple comments but no actual answer as of this writing. –  Jun 09 '16 at 12:15

3 Answers3

10

While you can't configure it in IDEA itself currently, there is the possibility to set it in your git config. That will affect all git clients including IDEA.

 git config --global merge.commit no
Alim Özdemir
  • 2,396
  • 1
  • 24
  • 35
  • This doesn't seem to work if I have to resolve merge conflicts. After I resolved the last conflicting file IntelliJ explicitly performs a `git commit` even though I have `merge.commit` set to _no_. – mrArkwright Oct 01 '20 at 08:28
  • You probably still have fast-forward , it circumvents the merge.commit setting. Do an additional `git config --global merge.ff false` – Alim Özdemir Oct 01 '20 at 11:44
  • 1
    Jetbrain does not honor this git global config `merge.commit no`. I am using Pycharm 2022.3 with latest git bundled plugin 223.8214.51. So each time, I have to pick the option for --no-commit. – Tim C. Jan 20 '23 at 16:41
5

Using PyCharm follow the steps below, it is pretty much the same on Idea

enter image description here

enter image description here

enter image description here

hevi
  • 2,432
  • 1
  • 32
  • 51
  • OP explicitly said he is aware of this and is additionally asking for "No commit" from the branch view dialog. – Steven Feb 10 '21 at 10:43
1

There is a workaround to prevent IntelliJ from automatically committing after resolving a merge conflict, you can follow these steps:

  1. Close the window that displays the list of merge conflict files.
  2. Reopen the window by using the resolve option.

By performing these actions, IntelliJ will no longer commit automatically once the last conflict file is resolved.

prabhu
  • 21
  • 2
  • 3