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:
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.
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.
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
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/
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
thanx again for your time.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs