Github,分叉后从上游拉/更新 [英] Github, pulling/updating from upstream after forking

查看:210
本文介绍了Github,分叉后从上游拉/更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我想为一个开源项目做贡献,为了做到这一点,我将该项目分叉到我自己账户上的远程存储库中.然后,我克隆该存储库并创建一个新分支,然后开始执行我想更新的任何操作.

Assuming I want to contribute to an open source project and in order to do so I fork the project into my own remote repository on my account. I then clone this repository and create a new branch and start working whatever I want to update.

在新分支上工作时,我从其分支的存储库已更新,因此我当前的fork不同步.然后如何继续同步我的远程fork/本地副本并将新更改合并到正在使用该功能的分支中?

When working on the new branch, the repository that I forked from has been updated so my current fork is out of sync. How can I then proceed to sync my remote fork/local copy and merge the new changes into my branch in which the feature is being worked on?

我假设我不能只从原点撤出,因为这是我分叉的资源库的一个单独的资源库,因此不会有更改.

I'm assuming I cannot just pull from the origin, as this is a separate repository to the repository I forked from thus wouldn't have the changes present.

我今天才开始查看有关Github的教程,并且对使用它感到更加自信,但这是我脑海中最后一个没有得到回答的问题.

Iv'e only started looking at tutorials on Github today and am feeling way more confident in using it, but this is the last question in the back of my mind that didn't get answered.

推荐答案

将原始上游存储库添加为本地fork的新远程目录,然后您可以手动从中提取.并阅读此github教程.

Add the original upstream repository as a new remote to your local fork and you can then pull from it manually. And read this github tutorial.

这篇关于Github,分叉后从上游拉/更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆