Search code examples
gitintellij-idea

Merge commit with IntelliJ IDEA


I was wondering whether it is possible to merge commit with IntelliJ IDEA?

Right now when I do merge and then push, it appears as a single in GitHub page.

enter image description here

I would like to do merge commit so that it stays consistent with my lectures. My lecturer teaches us to use merge commit when using Eclipse.


Solution

  • Sure, if you don't use the Git branches widget in the status bar on the lower right. There it does a fast-forward merge if possible.

    Instead use a shortcut or the menu to open the merge dialog. In the menu it is at VCS -> Git -> Merge Changes....

    There select the branch(es) you want to merge and set the checkmark for No fast forward which is the setting according to --no-ff on the commandline and will cause a merge commit to be created even if a fast-forward merge would be possible.