p0tta
p0tta

Reputation: 1651

How to create a git pull request on a public github repository

There is a public github repository to which I want to create a pull request. I have a project on my local machine that I need to check in and send it to them for review. I have tried the following and failed

git clone public repo
# create new branch
# add code in the branch 
git add/commit changes to this new branch 
git push 

When I do the git push I enter my github account credentials and it fails. I know that this should fail because I don't have access to their repo but what I am doing wrong? Do I need to create some sort of an account with them?

Upvotes: 16

Views: 7397

Answers (1)

Till
Till

Reputation: 4523

You first have to fork the project :

enter image description here

Then you can work on your version of the code.

You will finally push your branch to your repository and then you will be able to create a pull request on the main project.

You can find extra info here: Fork a repo or Contribute to someone's repository

PS: Related to How do I contribute to other's code in GitHub?

Upvotes: 25

Related Questions