Stuck at "A merge operation in progress"

39,345

Solution 1

I had a very similar problem with one of my projects which gave me the same TFS message in Visual Studio 2017. I was also using git. In my case I needed to manually add a comment to the commit before posting the merge. Since I had to manually merge the conflicts, a comment was needed rather than the auto-populated message that takes place on a merge without conflicts.

I'm well aware that commits need comments but if I recall correctly, VS 2015 would auto-populate the comment on a merge, even if you manually fixed any merge issues. Regardless, in VS 2017 you will need to add a commit comment when there are resolved conflicts.

Solution 2

When get conflicts during a pull action from remote Git repository in Visual Studio, you need to do a manual merge to choose Remote or Local version. After you click 'Accept merge', you need to commit this merge operation. You will see that like this picture below.

enter image description here

If you doesn't see this window, you could also commit from pending changes window. You can see that there's nothing under Changes tab. This is because you choose local version when you merge. Of cause, there's no file changes to show under Changes. But you still need to commit the merge operation.

enter image description here

Share:
39,345
Bernard Vander Beken
Author by

Bernard Vander Beken

Updated on July 17, 2022

Comments

  • Bernard Vander Beken
    Bernard Vander Beken almost 2 years

    Steps

    • In Visual Studio
    • Pulled from remote repo
    • 1 merge conflict
    • Merged manually, clicked 'Accept merge'

    Result

    • Message: "A merge operation is in progress in the ... repository. Commit your changes to complete the merge operation."
    • However, there is nothing to commit: There are 0 pending changes, no actions apart from Abort seem to be possible.

    Screenshot: https://pbs.twimg.com/media/DBOeRIiXsAEbnLP.jpg

    Context

    • Remote git repo is hosted in Visual Studio Team Services
    • Visual Studio 2017 with all updates
  • Bernard Vander Beken
    Bernard Vander Beken almost 7 years
    Thanks, I will try this approach when I can reproduce the issue again.
  • Tingting0929
    Tingting0929 almost 7 years
    @BernardVanderBeken maybe you could create a small test to verify. Like change a file in one local repository and push to VSTS. Then in another repository, edit the same file and commit. After that pull from remote. You will get a conflict.
  • Ursula
    Ursula over 6 years
    You're right! I didn't fill in a commit message (before a merge), a that's why I got stuck at the same moment like in this topic. What I did: I did a small/not important change in one file, and commited it with filling a comment message. In fact, when I checked the history, in this commit was included not only this one little change, but also all merged files. After this - everything works normally. Thanks a lot!
  • JohnOpincar
    JohnOpincar over 6 years
    The message is so misleading. It should change to say "enter a comment" instead of looking like a process is still running.
  • Taras Pelenio
    Taras Pelenio almost 4 years
    It's amazing. I also just added a new comment manually and after this the commit button is available for using.