在我分叉一个github项目之后,我怎样才能保持最初的项目? [英] after I fork a github project, how can I stay current with the original project?

查看:101
本文介绍了在我分叉一个github项目之后,我怎样才能保持最初的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在github上,在分叉项目之后,修改它,然后提交我的pull请求,似乎我必须删除并重新分叉才能保持最新状态,以便在我的pull请求得到满足后进行任何更改。

On github, after I fork a project, modify it, then submit my pull request, it seems that I have to delete and re-fork in order to stay current with any changes made after my pull request is honored.

为了保持最新状态,必须保持删除回购似乎非常繁琐。有没有办法保持它目前没有删除和重新分叉?

It seems tedious to have to keep deleting the repo to keep it current. Is there some way to keep it current without deleting and re-forking?

推荐答案

您应该将原始项目添加为远程你的工作副本。然后,您可以从原始存储库中提取更改并将其推送到您的分叉存储库。这个命令看起来像这样:

You should add the original project as a remote to your working copy. Then you can pull changes from the original repository and push them to your forked repository. The commands for this look something like:

git remote add upstream <original repo url>
git pull upstream master
git push origin

这篇关于在我分叉一个github项目之后,我怎样才能保持最初的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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