开发者

after I fork a github project, how can I stay current with the original project?

开发者 https://www.devze.com 2022-12-29 07:22 出处:网络
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 r开发者_JAVA技巧eques

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 r开发者_JAVA技巧equest 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


What you can do is create a pull request in your forked repo by comparing to the original repository and then merge it in your repository.

0

精彩评论

暂无评论...
验证码 换一张
取 消