... | @@ -23,9 +23,12 @@ The above is a very good summary, and you are encouraged to have it open or prin |
... | @@ -23,9 +23,12 @@ The above is a very good summary, and you are encouraged to have it open or prin |
|
|
|
|
|
|
|
|
|
### Setup
|
|
### Setup
|
|
|
|
|
|
|
|
> **Note:** In the sections below, `--global` implies changes will be applied to all projects. Remove the `--global` to apply the settings to only the current project.
|
|
|
|
|
|
Command | Effect
|
|
Command | Effect
|
|
--- | ---
|
|
--- | ---
|
|
`git config --global user.name "YOUR_USERNAME"` | Setup your name for your commits
|
|
`git config --global user.name "YOUR_USERNAME"` | Setup your name for your commits.
|
|
`git config --global user.email "YOUR_EMAIL"` | Setup the email address for your commits.
|
|
`git config --global user.email "YOUR_EMAIL"` | Setup the email address for your commits.
|
|
`git config --global color.ui auto` | Enable some colourful git output.
|
|
`git config --global color.ui auto` | Enable some colourful git output.
|
|
`git config --global core.editor "gedit -w -s" ` | Set commit message editor to `gedit`. Simple GUI editor.
|
|
`git config --global core.editor "gedit -w -s" ` | Set commit message editor to `gedit`. Simple GUI editor.
|
... | @@ -35,7 +38,7 @@ Command | Effect |
... | @@ -35,7 +38,7 @@ Command | Effect |
|
### Simple Git Commands
|
|
### Simple Git Commands
|
|
Command | Effect
|
|
Command | Effect
|
|
--- | ---
|
|
--- | ---
|
|
`git pull` | Fetch the latest code from the GitLab server and update your local copy.
|
|
`git pull` | Fetch the latest commits from the GitLab server and update your local repository.
|
|
`git status` | Show the current status of the local working tree.
|
|
`git status` | Show the current status of the local working tree.
|
|
`git diff <file or folder>` | Show changes from the file or all files if none specified.
|
|
`git diff <file or folder>` | Show changes from the file or all files if none specified.
|
|
`git add <file or folder>` | Add the specific file or folder to the staging area.
|
|
`git add <file or folder>` | Add the specific file or folder to the staging area.
|
... | @@ -64,6 +67,8 @@ For you, as a student, this means you will |
... | @@ -64,6 +67,8 @@ For you, as a student, this means you will |
|
|
|
|
|
**NOTE:** Always have a number of *safe* and *secure* backups of your code. GitLab should house one of a few copies of your projects.
|
|
**NOTE:** Always have a number of *safe* and *secure* backups of your code. GitLab should house one of a few copies of your projects.
|
|
|
|
|
|
|
|
**WARNING!:** A secure copy is not public project on GitHub or any other hosting service. Nor is it your friends computer. Please refer to your module guidelines in regard to code sharing and see the plagiarism declaration for your course. Another reference: [[https://www.sun.ac.za/english/legal/student-discipline]]. When in doubt, ask your lecturer.
|
|
|
|
|
|
### Login
|
|
### Login
|
|
GitLab has been setup such that you can login with your Stellenbosch University credentials.
|
|
GitLab has been setup such that you can login with your Stellenbosch University credentials.
|
|
|
|
|
... | | ... | |