我分叉了一个存储库 R
如 R1
。然后我做了一些改动 R1
。
B分叉了存储库 R
如 R2
,和 R2
成为主要维护的存储库。
现在我想发送拉请求 R2
, 怎么做?
如果我想保留我的话怎么办? R1
更新了 R2
?
我分叉了一个存储库 R
如 R1
。然后我做了一些改动 R1
。
B分叉了存储库 R
如 R2
,和 R2
成为主要维护的存储库。
现在我想发送拉请求 R2
, 怎么做?
如果我想保留我的话怎么办? R1
更新了 R2
?
发送拉取请求 R2
你可以点击 Pull Request
上 R1
(你自己的叉子)页面,然后 Edit
并选择 R2
存储库 base fork
部分。
从中提取更新 R2
把它们推到你的身边 R1
存储库,您可以添加新的远程 R2
像那样:
git remote add r2 git://github.com/<path-to-r2-on-github>.git
然后你可以从中获取变化 r2/master
到你当地 master
像那样:
git checkout master # checkout your local master
git pull r2 master # pull changes from master branch of r2 remote repository
然后将它们推送给你 R1
(我猜你有 R1
配置为 origin
远程):
git push origin master # push changes (that you previously pulled from r2)
# from local master to master in R1 repository
发送拉取请求 R2
你可以点击 Pull Request
上 R1
(你自己的叉子)页面,然后 Edit
并选择 R2
存储库 base fork
部分。
从中提取更新 R2
把它们推到你的身边 R1
存储库,您可以添加新的远程 R2
像那样:
git remote add r2 git://github.com/<path-to-r2-on-github>.git
然后你可以从中获取变化 r2/master
到你当地 master
像那样:
git checkout master # checkout your local master
git pull r2 master # pull changes from master branch of r2 remote repository
然后将它们推送给你 R1
(我猜你有 R1
配置为 origin
远程):
git push origin master # push changes (that you previously pulled from r2)
# from local master to master in R1 repository