Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

3rd party pull request conflict

nikibing January 19, 2017

I have a conflict on a pull request submitted by another person. How to I go about fixing the conflict so I can merge the pull request? I have looked at the related questions but none of the suggestions seem to work. The Bitbucket help leads to:

https://confluence.atlassian.com/bitbucket/resolve-merge-conflicts-704414003.html

but this seems to be for a pull request submitted by me ( repo owner)? I'm new to this so I may be wrong here, but the first command fails, as there isn't a branch on the remote to pull, I'm after a pull request.

 

I have tried git pull origin pull-requests/9 but it can't find that. I have pulled using the full path for pull-requests/9 which seems to work "* branch            HEAD       -> FETCH_HEAD" but then it says already up to date and git diff master gives no changes.

any help greatly appreciated.

1 answer

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2017

Irrespective of who created the Pullrequest, you can resolve the conflicts as long as you have 'write' access on the repo. 

You need to fetch the source and target branch to your local before resolving the conflict. Not the pull request. Once the source branch is checked out, you can merge the target into it and you will then see the same conflict locally. Then you resolve the conflict and push to remote. The pull request will be automatically updated.

nikibing January 19, 2017

ahaa, and thanx for your prompt response.

How do I fetch a branch from another persons forked repo? If I hover over the pull request the link I get is the pull request in my repo. The source branch is shown but how do I get the full path to the other persons forked repo? Do I have to email them and ask?

git checkout branch-name gives me error:pathspec.

sorry to be so dumb, first time smile

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2017

An option is to name the fork with a remote label and use it. See http://stackoverflow.com/questions/38949951/how-to-solve-merge-conflicts-across-forks for more details. 

You can also use the full url and branch name as mentioned at https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/

nikibing January 23, 2017

I thought I had tried using the full path, obviously not.

The links talk about me not having access to the main repo, but my situation is the other way around. I'm trying to fix conflicts in a pull request someone else has pushed to my repo. I read a thread saying the pull requester should fix the conflicts, which I guess is a work around.  I'll have to have another look at it. So much to learn smile

thanx again for your time.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events