New to Git and still a little perplexed. I have forked a project on github and would like to bring in/merge some recent changes made by the project owner on the original to my fork. Is this possible? The project is read only but basically, I'd like to get myself to a point where I can make edits and add code and then also bring in any changes in from the original/master.
Maybe I don't need to make a fork, and should just clone the master to my local hard drive. Any help much appreciated,
Yes, you can add the original repository as a remote to your local repository
$ git remote add upstream http://.....
and then you can
$ git fetch upstream
$ git merge upstream/any-changes
to get that data into your local branches (which you can then push back to your github fork)
You might also want to consider git rebase
. This undoes all your commits, fast forwards you to the latest commit on the upstream repository, then applies your commits one by one.
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