Skip to content
Permalink
Browse files
added notes on forking
  • Loading branch information
aa7401 committed Jan 21, 2019
1 parent d240889 commit 657beb8b03ac7465dc741ca1e6d221f540de3b07
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
@@ -13,19 +13,51 @@ You should see an IDE that displays the files down the left side with an editor

![Create a New Container](exercises/.images/goorm03.png)

## 1 Cloning the Lab Content
## 1 Accessing the Lab Content

The next step is to clone the repository containing the lab materials into the IDE. Start by opening the [GitHub page](https://github.coventry.ac.uk/340CT-1819SEPJAN/TEACHING-MATERIALS). Locate the **Clone or download** button, clicking this pops open a small window as shown. Copy the URL in this window to your clipboard.
The lab materials are in a repository on the University GitHub server. We need to make a copy of this repository by forking it, then clone it into Goorm.io, follow the instructions below carefully.

![Create a New Container](exercises/.images/github01.png)
### 1.1 Forking the Teaching Materials

Returning to the IDE, run the following command in the terminal:
You should start by logging in to the University GitHub server using your university username and password. Make sure you don't log into GitHub.com!

Next you should open the web page containing the 205CDE teaching materials and click on the small **Fork** button in the top-right corner of the page.

![The Clone Button](exercises/.images/github_fork_1.png)

You will be asked to select where you want to place the forked repository, make sure you choose your own personal space (the one that is named using your username).

![The Clone Button](exercises/.images/github_fork_2.png)

This will create an exact copy (clone) of the repository in your personal workspace. It should indicate where the original version was (see below).

![The Clone Button](exercises/.images/github_fork_3.png)

### 1.2 Cloning Your Repository

The next step is to clone the forked repository containing the lab materials into the IDE. Locate the **Clone or download** button, clicking this pops open a small window as shown. Copy the URL in this window to your clipboard.

![The Clone Button](exercises/.images/github_fork_4.png)

Returning to the IDE, run the following command in the terminal, the url to your forked repository should already be in the clipboard:

```shell
git clone https://github.coventry.ac.uk/340CT-1819SEPJAN/TEACHING-MATERIALS.git labs
git clone https://github.coventry.ac.uk/xxx/TEACHING-MATERIALS.git labs
```

This creates a `labs/` directory containing all the files from the repository.
This creates a `labs/` directory containing all the files from your forked repository.

### 1.3 Adding an Upstream Remote

Your forked repository is a snapshot of the contents of the original one. The problem is that the repository you forked (called the upstream repo) will be updated on a regular basis and we need to ensure these changes are pulled into your fork.

To do this we need to add a link to this repository and use this to pull new content down. Follow these instructions carefully:

1. Make sure you have the terminal window open and have navigated to inside the `labs/` directory. A quick check is to use the `pwd` command, the folder path should end with `/labs`. You may need to use the `cd labs` command to get to the right place.
2. Now you need to add the upstream remote using the `git remote add upstream https://github.coventry.ac.uk/205CDE-1819JANMAY/TEACHING-MATERIALS.git` command.
3. Finally we should check we have links to both the original repository and our fork using the `git remote -v`.

### 1.4 Disabling the Built-In Linter

By default real-time linting is enabled however this currently uses an old linter and is not ECMA6 compatible. You should disable real-time linting from the **Project** menu.

@@ -43,7 +75,7 @@ Now click on the small blue oval on the terminal tab to reload the shell. There

## 3 Running an Express Server

Use the terminal to navigate to the `exercises/01_setup/` directory and try running the `index.js` script:
Use the terminal to navigate to the `exercises/01_http/` directory and try running the `index.js` script:

```shell
$ cd exercises/01_setup/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 657beb8

Please sign in to comment.