Lessons and Assignments by Week


How to download solution code posted to an assignment repo after you made your fork:

  1. Navigate to your local repo from the command line
  2. Run git remote -v and note there is only one remote listed, your fork with the name origin
  3. 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
  4. Run git remote -v again to confirm that you now have two remotes, with upstream linked to the original repo
  5. Run git pull upstream master to pull in changes from the upstream remote's master branch
  6. You shouldn't encounter merge conflicts, but if you do, resolve them and do a commit after the resolution
  7. Run git push origin master to push the changes you got from upstream out to your fork on Github

results matching ""

    No results matching ""