在我分叉一个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