

Next I ran git status to make sure that the "working tree is clean"


and to be honest there is probably a better way to resolve this but this is how I resolved the conflict.įirst I abandoned the Pull Request using the button in the screen shot above. I never did think to try the git menus in VS Code, or the GIT GUI. While I do have VS installed I didn't want to use that as I am trying to just move to using VS Code and GIT command line where possible. In VSTS i was not able to find any such option, and all articles online seemed to indicate how to fix this in Visual Studio GUI. So when I pushed my changes from my local repo to VSTS and then used the web portal to create a Pull Request to merge the changes back into the master branch I received an error that there was a merge conflict blocking the pull request.Īs I mentioned normally in this situation I am use to there being options provided to select which file/change you want to be kept. The situation I faced was that I had been working in a branch and editing a file, which had also been edited by a colleague in the master branch (I know, I know.). For working with the VSTS GIT repo I use the posh-git which comes with the GitHub Desktop install, but the logic here should transfer. However I recently experienced a merge conflict with a pull request for one of my VSTS repositories where the code was written in Visual Studio Code.

Typically when I have come across merge conflicts in my VSTS repositories it has been with Visual Studio projects and so I could resolve them with the VS GUI. GitHub is pretty straight forward for resolving merge conflicts of pull requests through it's online portal. I use a combination of GitHub and Visual Studio Team Services (Visual Studio Online, VSTS, etc) repositories.
