Beginner Bitbucket: pull request after merge without a Fork

I started using Bitbucket (with mercurial) by pulling a repository directly from a collaborator's Bitbucket account. That is, I never used Bitbucket to create a Fork to my own Bitbucket account. [I now realize I should have created a Fork on Bitbucket then pulled that fork to my local machine]. Anyway, I just completed a significant merge of the code on my local machine, and I want my collaborator to pull the merged code back to the main trunk. But he can't pull it directly from my local machine. I'm not authorized to push it up to his Bitbucket account. Any idea what's the best way out of this predicament?

Thanks, Jared

1 answer

1 accepted

You can still fix this yourself, as long as you have read access to the original repository. Go to that repo, and create a new fork. Then, on your local machine, update the remote URL of the repository to point to the fork you created in your account (see the Mercurial section of this guide). Then, push your code into your fork. A simple push, perhaps with --new-branch should do it. Then, create a Pull Request from your fork to your collaborator.

Thanks a lot, worked like a charm!

P.S.: I had not thought of this partly because I have another fork from the same repository, and I didn't realize you could have 2 different forks from the same repo (as long as you give the forks different names).

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

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&nbsp...

2,006 views 1 5
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you