|
|
|
# Git Usage in the Labs
|
|
|
|
|
|
|
|
## Fork and Clone
|
|
|
|
|
|
|
|
We will now go learn how to clone the lab and push to your Gitlab account.
|
|
|
|
For the purposes of this tutorial, suppose we want to manage Lab 1 using Git.
|
|
|
|
The first step is to navigate to [the 150 Students group](https://gitlab.pcs.cnu.edu/groups/cpsc150-students-s2017) if you are in CPSC 150L
|
|
|
|
or [the 250 Students group](https://gitlab.pcs.cnu.edu/groups/cpsc250-students-s2017) if you are in CPSC 250L.
|
|
|
|
On that page you should see a project called `cpsc150l-lab01` or `cpsc250l-lab01`; click that project.
|
|
|
|
|
|
|
|
On the project page click the fork button as shown below, then click your group's icon.
|
|
|
|
Once Gitlab finishes you will be brought to your own copy of the repository.
|
|
|
|
|
|
|
|
<p align="center">
|
|
|
|

|
|
|
|
</p>
|
|
|
|
|
|
|
|
After Gitlab finishes forking the repository, we need to change the visibility of it.
|
|
|
|
To do so, click the gear in the upper right hand corner of the screen and then click "edit project" in the menu that drops down.
|
|
|
|
You should see a section called "Visibility Level" in the page that follows.
|
|
|
|
Check "Private" like shown below and scroll down and click save.
|
|
|
|
|
|
|
|
**WARNING: Any assignments that are listed as "Public" or "Internal" is an Honor Code violation.**
|
|
|
|
|
|
|
|
<p align="center">
|
|
|
|

|
|
|
|
</p>
|
|
|
|
|
|
|
|
Next, we need to add your instructor to the project (for grading purposes).
|
|
|
|
Click the gear again and then click members.
|
|
|
|
In the following page, type your instructors name or Gitlab handle into the "People" box and then click "Add users to project".
|
|
|
|
|
|
|
|
**WARNING: It is an Honor Code violation if you add people other than your instructor or teammates (if and only if it is an assigned group project).**
|
|
|
|
|
|
|
|
Go back to the repository's main page, by clicking its name in the upper left hand corner of the screen.
|
|
|
|
Look at the URL shown near the top middle of the screen (located below the star and fork buttons).
|
|
|
|
Ensure that HTTPS is selected and copy the URL (see below).
|
|
|
|
|
|
|
|
<p align="center">
|
|
|
|

|
|
|
|
</p> |