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?
If you don't have access to create branches on that repository, there is no way to create a pull request without forking.
You first have to fork the project :
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With