How to resolve merge conflict in pull request in VSTS?

后端 未结 4 1863
野的像风
野的像风 2020-12-02 13:59

I\'ve created pull request I got into this:

\"Approve\" button does nothing and complete is disabled.

How do I resolve this confligt in pull request

4条回答
  •  萌比男神i
    2020-12-02 14:42

    This answer is in reference of comment by @metabuddy on the answer of @sky91

    What if your target branch in 'master' and on 'master' branch you have the policies applied to not accept direct merges?

    Note: Consider 'master' is target branch and 'x001' is the source branch in pull request, which has conflicts between 'master' and 'x001' branch.

    In that case solution by @sky91 will not work. For this you to follow these steps.

    1. Create a new branch from target ('master') branch, like 'x002'
    2. Go to visual studio, and select 'x002'
    3. Merge 'x002' from 'x001' branch.
    4. Go to your pull request and change the target branch to 'x002'
    5. It will show the same conflicts as you have in the pull request.
    6. Resolve all the conflicts and commit the merge.
    7. When you refresh the pull request page, it will show that 'changes already merge'
    8. It must show 'Close' button. if it is there, then close this pull request.
    9. Now all your changes has been merged and saved to 'x002'
    10. Create a new pull request from 'x002' to 'master'
    11. Because all the conflicts are gone, it will allow merging into 'master' branch.

提交回复
热议问题