Lessons and Assignments by Week
How to download solution code posted to an assignment repo after you made your fork:
- Navigate to your local repo from the command line
- Run
git remote -v and note there is only one remote listed, your fork with the name origin
- Run
git remote add upstream <url of original repo, not your fork> to add an additional remote named upstream which points to the original repo
- Run
git remote -v again to confirm that you now have two remotes, with upstream linked to the original repo
- Run
git pull upstream master to pull in changes from the upstream remote's master branch
- You shouldn't encounter merge conflicts, but if you do, resolve them and do a commit after the resolution
- Run
git push origin master to push the changes you got from upstream out to your fork on Github