如何从我的叉派发拉请求到另一个叉? [英] How to send pull request from my fork to another fork?
问题描述
我将一个版本库 R
分为 R1
。然后,我对 R1
进行了一些更改。
B将存储库分成
R
作为 R2
和 R2
成为主要维护的存储库。 现在我想发送拉请求到 R2
,怎么办? 如果我想用 R2
?
Pull Request
在 R1
(您自己的分支)页面,然后编辑
并选择 R2 $ c $在基本叉
部分中的存储库。
$ b 要从 R2 $> c $ c>并将它们推送到 R1
存储库中,您可以为 R2
添加新的远程文件: git remote add r2 git://github.com/< path-to-r2-on-github> .git
然后,您可以将更改从 r2 / master
拖到您的本地 master
那样:
git checkout master#签出您的本地主
git pull r2 master# r2远程仓库的分支
然后将它们推送到 R1
(我假设你有 R1
配置为 origin
remote):
git push origin master#推送更改(您之前从r2提取的)
#从本地主服务器到R1存储库中的主服务器
I forked a repository R
as R1
. Then I make some changes to R1
.
B forked the repository R
as R2
, and R2
becomes the mainly maintained repository.
Now I want to send pull request to R2
, how to do?
And what if I want to keep my R1
updated with R2
?
解决方案 To send pull request to R2
you can click Pull Request
on R1
(your own fork) page, then Edit
and choose R2
repository in base fork
section.
To pull updates from R2
and push them to your R1
repository you can add new remote for R2
like that:
git remote add r2 git://github.com/<path-to-r2-on-github>.git
Then you can pull changes from r2/master
to your local master
like that:
git checkout master # checkout your local master
git pull r2 master # pull changes from master branch of r2 remote repository
And then push them to your R1
(I assume you have R1
configured as origin
remote):
git push origin master # push changes (that you previously pulled from r2)
# from local master to master in R1 repository
这篇关于如何从我的叉派发拉请求到另一个叉?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!