I'm still very new to coding and Github and as such am a little confused with how forking repos works - so please forgive what may be a basic question.
I've been working on a project with different pair partners all week and my current code base situation is as follows:
My initial repo - https://github.com/timrobertson0122/yelp_clone
This code was then forked and work continue on a second repo - (can't post url)
That repo was subsequently forked and contains the most recent code, that I worked on with a colleague yesterday, which I can't fork - https://github.com/curlygirly/yelp_clone-1
So my question is how do I sync my original repo? Can I just add an upstream to the most recently forked repo that points to the original repo? Do I need to submit pull requests?
Best How To :
You can add
curlygirly's repo as a remote to your original repo and merge in changes from it just like any other branch. For example, if you want to merge everything on
master branch into your original repo's
git remote add curlygirly https://github.com/curlygirly/yelp_clone-1.git
git fetch curlygirly
git checkout master
git merge curlygirly/master
You can also do this using Pull Requests if you prefer, want to put it through code review, etc. Simply open a request from
curlygirly:master (or any other branch) to
timrobertson0122:master and go from there.
The great thing about Git is that repositories, branches, commits, etc. are all just building blocks you can manage any way you like. There's nothing special about your first repo,
master, so you're free to work on code anywhere, and move it anywhere else later.