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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to submit a pull request as a first time contributor? Edited

I can't create a pull request.

I cloned a repo, made some changes, tested them, created a new local branch, switched to that branch and committed my changes. Then I notified the owner that I would like to push these changes, to which he said send a pull request. So I switch back to master branch and try to push the branch to origin but I am apparently forbidden from doing that (403). If I click on the 'create pull request' button it just says 'we can't let you see this page'.

Am I doing something wrong or do I have to be allowed to do this by the repo owner?

Thanks,

Louis

2 answers

1 accepted

0 votes
Answer accepted

If not part of the development team, one needs to get permission from the repo maintainers to be able to push changes.

Alternatively one can fork the repo, create a branch, add and commit changes. A pull request can then be made to merge this fork into the original repo.

0 votes
Mikael Sandberg Community Leader Nov 19, 2019

Hi @Louis Fry-Bouriaux,

Welcome to the Atlassian Community.

To create a pull request you need to push your branch where you made your commits back to Bitbucket. Then log on to Bitbucket to create your pull request to merge your branch into master. Check out Create a pull request to merge your change, and I can also recommend this tutorial, Making a Pull Request

Hi @Mikael Sandberg ,

Thanks for the reply! I can't seem to push the branch however:

After creating the branch, adding and committing changes, then switching back to master from the command line, when I do 'git push origin clabels' where 'clabels' is the branch I created and committed to locally, I get the following:

Screenshot from 2019-11-19 21-02-13.png

What am I doing wrong here? Do I need to push somewhere else first?

Mikael Sandberg Community Leader Nov 19, 2019

The password you are entering is not correct, that is why remote says Forbidden. Make sure you are using the correct password or consider using SSH instead to bypass having to enter username and password.

Hmm, ok but if I deliberately type in a wrong password it says 'Invalid username or password'. SSH doesn't seem to work either. I'm fairly certain I don't have write privileges to the repo.

So I solved it by first forking the repo so that I could push to my version, then make a pull request for the owner to merge it with his master repo. Now the terminology makes more sense to me.

I found no guide to doing this, just a random comment in some stackoverflow question dating back to 2011.

I must still ask just to be sure, is this the only way to make a first contribution to a repo which I don't own and which I am not part of in any way?

Thanks for the assist in any case!

Mikael Sandberg Community Leader Nov 20, 2019

To contribute to a repository you need to have write permission to it, so if the owner of it does not give you that permission you will not be able to create a pull request.

Like Louis Fry-Bouriaux likes this

Thanks Mikael, should I edit this whole post to maybe make it more helpful to someone else? Like change the title to "How to submit a pull request as a first time contributor?"

Then the answer will make more sense, as my question as it stood could obviously be answered by the documentation you suggested.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,787 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you