问题
Hi I have this problem with TFS and git pull requests.
We have two main branches: -master -develop
So I create new branch async_data_loading from develop and do some changes in it. Next I commit and push my changes to remote async_data_loading and then I create new pull request to merge my changes into remote develop and I get this:
But when I try to find any merge conflicts from console there is none to fix...I can even merge my changes to my local develop without any problems. As you can see below my local branch and develop are on the same 'branch' so there are no conflicts to solve, just my branch is ahead of few commits.
Anyone had this problem and solved it? I've spent couple of hours searching for the solution but found nothing.
The funny thing is that if I create a test branch from master and then follow steps as with develop there are no problems with merging my test branch to master on TFS.
回答1:
Ok the problem is fixed now. We found out that some files from one of the folders were copied and their names were the full path to these files on one of the developers system, something like this:
{PC_name}/Users/{user_name}/{full_path_to_local_file}.cs
When we removed these files TFS suddenly were able to complete merge on server without complaining.
The thing that annoys me is the lack of any information why merge on server failed. This is surely something that MS should fix in a future...
回答2:
We were experiencing a similar problem. In our case, angle brackets (< >
) in the TFS user's email were making LibGit2Sharp throw an exception under the hood, which was not displayed in the error message in TFS (same visual result as OP described). I also posted an answer here with the stack trace:
https://stackoverflow.com/a/39841140/2496266
回答3:
Just test in TFS 2015.2 + VS 2015.2, can't reproduce this issue. A conflict often occurs when you merge two branches in which the same file is changed. Make sure you have fetch the latest for develop branch before branch it.
回答4:
We ran into this issue more recently and had a heck of time just finding it. eventvwr is super-noisy and didn't have any good information for us.
What I did to find the issue was took a version of a code base and put into a diff't repo and set it up as our mainline (develop, whatever). Then took our full mainline and set it up a feature branch. I then went into detached mode in our full mainline / feature branch, and started creating different branches (binary search basically). I created Pull Requests for all those scenarios, if it reproduced the "merge failed" issue I knew I went to far. If I got a clean merge, I knew I needed to go farther.
Eventually we found a file with a '\' in the name of it. Removing this file I was able to clear everything up. I suspect this is because most of the PR/Merging functionality occurs on a Windows platform.
MS if you're listening update eventvwr with less-noisy and more material information.
来源:https://stackoverflow.com/questions/37595271/tfs-git-pull-requests-merge-failed