如何做一个GitHub拉取请求 [英] How to do a GitHub pull request
本文介绍了如何做一个GitHub拉取请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何创建和/或发送拉请求到另一个托管在GitHub上的存储库?提出拉取请求我只是在Github上跟随两个单独的帮助页面(以下链接为bullet点)。以下命令行命令适用于第1部分。 第2部分,实际的请求请求,完全在Github的网站上完成。
$ git clone https ://github.com/tim-peterson/dwolla-php.git
$ cd dwolla-php
$ git remote add upstream https://github.com/Dwolla/dwolla-php.git
$ git fetch upstream
//对这个新克隆的本地仓库进行更改
$ git add。
$ git commit -m'第一次提交给dwolla'
$ git push origin master
-
第1部分:为某人的回购: https://help.github.com/articles/fork-a-repo
- 点击在这种情况下,您想要参与回购的分叉按钮: Dwolla的PHP回购 (Dwolla / dwolla-php)
- 获取新创建的分支的URL,在这种情况下: https://github.com/tim-peterson/dwolla-php.git (tim-peterson / dwolla-php)
- 键入
git clone-> cd dwolla-php-> git remote-> git fetch
序列克隆您的计算机中某处的分支(即复制/ paste,在这种情况下:third_party TimPeterson $
),并将其与主代表同步o(Dwolla / dwolla-php)
- 对您的本地存储库进行更改
- 键入
git add-> git commit-> git push
序列将你的改变推送到远程仓库,也就是你在Github上的分支(tim-peterson / dwolla-php)
第二部分:make pull-request: https://help.github.com/articles/using-pull-requests - 转到您的叉子在Github上的网页( https://github.com/tim-peterson/dwolla-php )
- 点击pull-request按钮
- 拉请求一个名字,填写你做了什么更改的细节,点击提交按钮。
- 完成了!
How do I create and/or send a pull request to another repository hosted on GitHub?
解决方案
To learn how to make a pull request I just followed two separate help pages on Github (linked below as bullet points). The following command line commands are for Part 1. Part 2, the actual pull request, is done entirely on Github's website.
$ git clone https://github.com/tim-peterson/dwolla-php.git
$ cd dwolla-php
$ git remote add upstream https://github.com/Dwolla/dwolla-php.git
$ git fetch upstream
// make your changes to this newly cloned, local repo
$ git add .
$ git commit -m '1st commit to dwolla'
$ git push origin master
Part 1: fork someone's repo: https://help.github.com/articles/fork-a-repo
- click the 'fork' button on the repo you want to contribute to, in this case: Dwolla's PHP repo (Dwolla/dwolla-php)
- get the URL for your newly created fork, in this case: https://github.com/tim-peterson/dwolla-php.git (tim-peterson/dwolla-php)
- type the
git clone->cd dwolla-php->git remote->git fetch
sequence above to clone your fork somewhere in your computer (i.e., "copy/paste" it to, in this case:third_party TimPeterson$
) and sync it with the master repo (Dwolla/dwolla-php) - make your changes to your local repo
- type the
git add->git commit->git push
sequence above to push your changes to the remote repo, i.e., your fork on Github (tim-peterson/dwolla-php)
Part 2: make pull-request: https://help.github.com/articles/using-pull-requests
- go to your fork's webpage on Github (https://github.com/tim-peterson/dwolla-php)
- click 'pull-request' button
- give pull-request a name, fill in details of what changes you made, click submit button.
- you're done!!
这篇关于如何做一个GitHub拉取请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文