NOTE: Solution branches will always exist on the repo you forked from at the end of each sprint. You will need to do this process for EVERY repo.
There are several ways you can view the solution branch to a repo. We provide two options currently.
- View solution on Github
- View solution on Local Machine
To view the solution on github you must do the following steps:
- Go to the original repo on github (The one you forked from). Repo will look like
hackreactor/cohortname-reponame
. Example:hackreactor/rfc2202-toy-problems
- On the repo page you will see a dropdown menu labeled
master
. This is the default branch for viewing. To view the solution branch selectsolution
.
- You can now navigate the solution code in the code panel.
The process to get the solution code on your local machine is more involved and will require to connect your local code to the repo you forked from via an upstream
url.
For us to make a connection to the original repo we will need to add a new url by the name of upstream.
In Terminal:
git remote add upstream [url]
NOTE: replace [url] with the url of the repo you forked from. I.E.
hackreactor/rfc2202-toy-problems
notdalton/rfc2202-toy-problems
Now we want to get the solution branch that was released on the upstream repo.
In Terminal:
git fetch upstream solution
In Terminal:
git checkout solution
In Terminal:
git pull upstream solution
You will now be able to navigate the solution code on your local machine.