2

I'm using Visual Studio Online (VSO) with Git. This is the first time I'm working with other people, so two of us made changes in the *.csproj file.

We have our branches this way:

+ master
 + dev
  + backend
  + frontend

My colleague and me both submited pull requests to merge our branches to the dev branch. The "backend" branch from my partner completed successfully. When merging my "frontend" branch, I'm getting a conflicting problem with the csproj file, as expected, because we both added files to the project and solution.

I get the following error: conflict prevents automatic merging. MyProject.csproj Edited in both. Next steps: Manually resolve these conflicts and push new changes to the source branch.

What I can't find for the life of me is a button or link that takes me to the place where I can resolve this manually. Not in the PR overview, files, updates or commits tab.

All the examples I have found so far, concern themselves with Visual Studio, instead of the web interface of Visual Studio Online. According to such documentation, when pulling the changes I should see a "there's a conflict, click here to resolve" link. But the pull and sync operations finish without showing any problem. Of course, it does not download any changes, since the PR hasn't been completed at all.

So I'm at a loss at how to resolve this problem. It seems a fairly easy, common scenario, but the VSO website doesn't show any button. It is my understanding that the benefit of using Git over old Visual SourceSafe (VSS) is that Git would manage this scenario easily, without the checkin/checkout strategy that VSS uses.

What is the process I should follow in order to address this situation?

Thanks in advance.

w5m
  • 2,286
  • 3
  • 34
  • 46
Fernando Gómez
  • 464
  • 1
  • 5
  • 19
  • Only if the merge can be resolved without conflicts, can you perform the merge in the Web UI. – jessehouwing Oct 30 '17 at 19:48
  • @jessehouwing So I take it mine is not a common scenario? Everytime there's a conflict, should I perform this operations (clone locally, rebase, as suggested in the linked response) manually, everytime there's a conflict? I that's the case, isn't the checkin/checkout approach of VSS better? Or am I understanding the PR process wrong? Thanks in advance. – Fernando Gómez Oct 30 '17 at 19:57
  • You could actively try not to make merge conflicts ;).. – jessehouwing Oct 30 '17 at 20:03
  • Basically you're out of luck because git doesn't know how to merge this, most changes will be mergable in the web ui. In which case the pull request will be updated automatically. – jessehouwing Oct 30 '17 at 20:05
  • I get it, but adding files to a project is kinda common. So what you're implying is that git / VSO doesn't consider many programmers working on the same project a common scenario. How would you mange this? Thanks again for your time. – Fernando Gómez Oct 30 '17 at 20:08
  • 1
    You'd normally locally pull these changes in before creating the pull request. You wouldn't even need to clone again and perform the merge, you can quickly do that in your existing repo. But git makes it a conscious act, not something that "just magically happens". – jessehouwing Oct 30 '17 at 20:12
  • 3
    All right, got it. Thanks @jessehouwing, that made it clear enough. And yes, the "Merge from target to current branch prior to completing the PR" portion of the answer made the trick: I did a merge, got the "conflicting files" message in Visual Studio. After that I merged the file, committed the changes and pushed the commit to VSO. After that, the "Approve" button in the PR web interface became enabled. – Fernando Gómez Oct 30 '17 at 20:29

0 Answers0