Github, pulling/updating from upstream after forking [duplicate]

不打扰是莪最后的温柔 提交于 2019-12-11 17:22:11

问题


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.

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.

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.


回答1:


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.



来源:https://stackoverflow.com/questions/46358052/github-pulling-updating-from-upstream-after-forking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!