Git merge conflicts – “commit” VS “rebase –continue”

I just finished resolving some conflicts due to a pull from the remote repository of my project.

I know that once conflicts have been resolved you have, to my knowledge, 2 solutions :

  • git rebase --continue
  • git commit -m "foobar"

I was just wondering if there are any differences between those 2 operations, in this context only, as I know they are fundamentally different in their basic form ?

  • Automatically keep a secondary repo in sync with a primary repo?
  • What is the best way to organize multiple projects when using git
  • Git pull from my public repository not working
  • Eclipselink: how to add it to local repository
  • origin/, remotes/origin/ Git confusion
  • gitosis: same user multiple machines
  • How to merge 2 LOCAL git repositories on 2 machines into one?
  • clone git repository to an FTP server
  • One Solution collect form web for “Git merge conflicts – “commit” VS “rebase –continue””

    EDIT #2:

    If you initiated this situation with git pull, the expected resolution is to use git commit, because you are creating a new commit to represent the successful merge. If this situation was initiated with git pull --rebase, you would want to use git rebase --continue as mentioned in my original answer, as this will reuse the same commits without creating any new ones.

    Original answer (in which I assumed this was initiated with git pull --rebase):

    I can tell you that the recommended method is to use git rebase --continue. (See here:

    The git commit method may work, but it may change your commit history if you don’t use the -C flag, which is what resolving a git merge will recommend. I suppose it is also worth mentioning that the -m flag will change the log message, whereas the git rebase --continue will reuse the old commit message without asking.


    Further research confirms my suspicions that the git commit method is dangerous and may leave your repo in an undesirable state. See here:
    and here: Forgot "git rebase –continue" and did "git commit". How to fix?

    Git Baby is a git and github fan, let's start git clone.