[英]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. 有一个公共github存储库,我想创建一个拉取请求。 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. 当我执行git push时,我输入了我的github帐户凭据,但它失败了。 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?
我需要创建某种帐户吗?
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 您可以在这里找到额外的信息: fork repo或Contribute to someone's repository
PS: Related to How do I contribute to other's code in GitHub? PS: 我如何在GitHub中贡献其他代码?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.