... | ... | @@ -106,7 +106,7 @@ Now we will copy the key you have just created to your GitLab account. |
|
|
2. Type: `cat ~/.ssh/id_rsa.pub`.
|
|
|
|
|
|
For example (usually the key appears on more than one line):
|
|
|
```
|
|
|
```bash
|
|
|
$ cat ~/.ssh/id_rsa.pub
|
|
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB/Qw/T0HlOcbh+joCpYjyQQo4X0C0JHDhw08EPxjYs1vC1eiN3Rd6rL7YGhQqhmhduoAwMZszqN8HL/lXVecljbGzh5e6nPt47yrCMO8LRW5tjUc1yF9SVpslqI+ehFX6aFFMByMLCA5Z4LHiukTQ0frmYhzeRnQYuzD8e2nywBCWUeGK+nNmqVbgcZoH6xPHeiLV+g+1mBLOmZzNzHLCzteHXRISzb/3AthRq6YVPFCHRLfubekQCCXlYHYCjA890dQ-s+9SUjBpYXB/VvYKYolW1diXSQ7VvkD38BJlOq6L9pKH0NlAxhAEzUSfrWN0gm8OBkIBb/dksIDxQvUUmvEiD4DW693RUevl/1hZsZ/hQmk3TSdK62C7z7eSlroS59eCcaAVRL009crF3H3gAUjMh/XfBY9nw+8HBpBA6BlOSI29owviZFUexVHcUG6SVkGyaH/Z9R6cYJZnDIRC4MmDNDVUnERR+1dAhgXHIqpYDG0h5cWlDvpzosIAkPK5y+/ExsjCPkRlEX5mMgL7Nm5pmtD/avxCeQRVRRsag//FPY50Nns8a4+J5yZb0uM8eTEAug1CDSNrmSl4ofrchCJxvVo9BQ0yA/kS9I2ffnUhftr/TzhlXQVkGx3/7+aSA6vpXgWByrPiW4fDilPq0Gp8XZJP8DIwiPGt1GXp name@example.local
|
|
|
```
|
... | ... | @@ -133,7 +133,7 @@ Let's get your code from the server to your local machine. |
|
|

|
|
|
|
|
|
3. Open a terminal and use "cd" to **c**hange **d**irectory to where you would like to store your code. For example, below I create a new directory in my home directory called "git", I then "cd" into that directory.
|
|
|
```
|
|
|
```bash
|
|
|
# "~/" is a shortcut for your home directory
|
|
|
$ mkdir ~/git
|
|
|
$ cd ~/git
|
... | ... | @@ -225,12 +225,12 @@ Let's create a file in your git directory and see how this change is shown in gi |
|
|
In this message you will also see a summary of changes. You should see both "fred.txt" and "java.txt".
|
|
|
|
|
|
Once you have saved your message, you should see something like this:
|
|
|
````
|
|
|
```bash
|
|
|
[master 6b46d28] Added Fred and Java to fix bug 33
|
|
|
2 files changed, 0 insertions(+), 0 deletions(-)
|
|
|
create mode 100644 fred.txt
|
|
|
create mode 100644 java.txt
|
|
|
````
|
|
|
```
|
|
|
This means your changes have been successfully committed! However, they are not on the server yet.
|
|
|
|
|
|
#### Sending code back into GitLab
|
... | ... | @@ -239,7 +239,7 @@ Now that we have added a commit, we need to send those changes back into GitLab. |
|
|
1. Back in your terminal, "cd" into your project directory.
|
|
|
2. Type `git push`.
|
|
|
3. You should be prompted for your SSH key password. Enter this and hit "Enter". If all goes well, you should see something like the below.
|
|
|
````
|
|
|
```bash
|
|
|
Counting objects: 3, done.
|
|
|
Delta compression using up to 4 threads.
|
|
|
Compressing objects: 100% (2/2), done.
|
... | ... | @@ -247,7 +247,7 @@ Now that we have added a commit, we need to send those changes back into GitLab. |
|
|
Total 3 (delta 0), reused 1 (delta 0)
|
|
|
To git.cs.sun.ac.za:slug/netbot.git
|
|
|
715fe21..6b6d123 master -> master
|
|
|
````
|
|
|
```
|
|
|
|
|
|
Congratulations! You have added your local changes to the server. Feel free to click around in the browser to see what this looks like.
|
|
|
|
... | ... | |