Search code examples
gitvisual-studiorebaseatlassian-sourcetree

Git rebase visual studio vs source tree


I have been doing git pull rebase through Visual studio, and after resolving a conflict I just need to click Continue and that's it. It does not ask for a commit or commit message.

But when I want to do rebase in source tree, after resolving conflicts and clicking Continue Rebase I get this error:

Please supply the message using either -m or -F option.
error: could not commit staged changes.

It asks me to commit code after conflict is resolved to be able to do Continue Rebase.

My question is why Visual studio is not asking for this commit and Source tree is. Is there anything else that Visual Studio does under the hood except for git rebase --continue in order to achieve this? Some additional command or parameter?


Solution

  • SourceTree is using regular Git, while Visual Studio, depending on its version, is using libgit2 or, more recently, its own Git installation (and GitHub integration)

    So the configuration between the two Git could be different.

    VS might be set to execute:

    cmd /V /C "set "GIT_EDITOR=true" && git rebase --continue"
    

    That will bypass the editor step asking to provide a message.
    Using that same command in a custom action in SourceTree would achieve the same result.