I forked a repository on Github. Now, the original had some update. How can I pull the changes from the original repository and keep sync with them?
And if my source is conflict with the original source, do I have a chance to edit it manually?
EDIT1: Thanks everyone's help. I think I need to RTFM :)
What's not stated explicitly in the other two answers is that you can't merge directly from the original project on github to your fork on github, you need to go via a local clone on your own machine.
So you set up the original project as a remote (called upstream
in Magnus Skog and CJlano's answers), then pull from that remote into your local clone, resolving any merge conflicts with your local changes, then push the result to your fork on github.
Just add the original repository as a remote and pull changes from it
git remote add upstream path/to/upstream/repo.git
git pull upstream master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With