2 – Fork our tutorials repository

We’re going to start using our tutorial materials repo, which contains an incomplete example for you to work on. So, as we’re going to be making changes to the code, let’s fork the repo. You’ll find it here.

First, click the fork button towards the top right of the screen.

../_images/fork_button.png

You will be asked to authorize the fork being placed into your account. Then, using the instructions for your operating system below, clone your fork to your local machine:

Linux/MacOSX

From a terminal create an environment variable for your github username (substitute <username> for your github username):

export GITHUB_USERNAME=<username>

Then copy and paste the following:

git clone https://github.com/$GITHUB_USERNAME/tutorials.git $GOPATH/src/github.com/$GITHUB_USERNAME/tutorials
cd $GOPATH/src/github.com/$GITHUB_USERNAME/tutorials
git remote add upstream git://github.com/ReconfigureIO/tutorials.git
git fetch upstream
git checkout v0.5.1

Windows 10

From a Powershell terminal create an environment variable for your github username (substitute <username> for your github username):

$env:GithubUsername="<username>"

Then copy and paste the following:

git clone https://github.com/$env:GithubUsername/tutorials.git $Env:GOPATH/src/github.com/$env:GithubUsername/tutorials
cd $Env:GOPATH/src/github.com/$env:GithubUsername/tutorials
git remote add upstream git://github.com/ReconfigureIO/tutorials.git
git fetch upstream
git checkout v0.5.1