问题
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