|
|
## Welcome to GitLab!
|
|
|
|
|
|
> If this is your first time using `git` or simply using this GitLab server, please read through __[First time using GitLab](First time using GitLab)__ before anything else.
|
|
|
> If this is your first time using `git` or simply using this GitLab server, please read through __[First time using GitLab](#First Time Setup)__ before anything else.
|
|
|
|
|
|
If you are looking for GitLab's docs? They are **[here.](https://git.cs.sun.ac.za/help/#gitlab-documentation)**
|
|
|
|
... | ... | @@ -39,8 +39,60 @@ Command | Effect |
|
|
2. `git commit` the changes in the staging area to a commit.
|
|
|
2. `git push`
|
|
|
|
|
|
### Links and Videos
|
|
|
|
|
|
## First Time Setup
|
|
|
This section is aimed towards first time users of both Git and this instance of GitLab.
|
|
|
|
|
|
### What is `git` and GitLab?
|
|
|
Let's get this info from git's website:
|
|
|
> "[Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.](https://git-scm.com/)"
|
|
|
|
|
|
Then from the Wikipedia page about GitLab:
|
|
|
> "[GitLab is a web-based Git-repository manager with wiki and issue-tracking features, using an open-source license, developed by GitLab Inc.](https://en.wikipedia.org/wiki/GitLab)"
|
|
|
|
|
|
For you, as a student, this means you will
|
|
|
1. Learn how to use version control in order to help prepare you for the working world,
|
|
|
2. Be able to safely submit and track your code, with the over-site of the lecturers and demis,
|
|
|
3. Have a safe place for your project code, provided you push your local changes back to the CS GitLab server.
|
|
|
|
|
|
**NOTE:** Always have a number of *safe* and *secure* backups of your code. GitLab should house one of a few copies of your projects.
|
|
|
|
|
|
### Login
|
|
|
GitLab has been setup such that you can login with your Stellenbosch University credentials.
|
|
|
|
|
|
1. Click the **Sign In / Register** button at the top corner, or **[click here](https://git.cs.sun.ac.za/users/sign_in)** to open the login page in a new tab.
|
|
|
2. Now click the **US Single Sign-On button** encircled in red in the below image.
|
|
|
|
|
|

|
|
|
|
|
|
3. You will be re-directed to the University single sign on system to login.
|
|
|
|
|
|
Congratulations! You should now be logged in. You won't be able to create any projects or groups as an undergraduate, but if you are a postgraduate, you can request permissions for this.
|
|
|
|
|
|
If you have been enrolled in a course that uses GitLab for projects, you should see the projects listed on this page.
|
|
|
|
|
|
### SSH key Setup
|
|
|
Next, we will need to add your SSH key so that you can `clone` a copy of the project repository (or repo for short) to your local PC. We assume you are using a NARGA machine, but these instructions should be applicable for any Linux machine.
|
|
|
|
|
|
#### Create a new SSH key
|
|
|
If you don't have an SSH
|
|
|
|
|
|
### First project clone
|
|
|
|
|
|
### Understanding the `git` workflow
|
|
|
|
|
|
All commands need to be executed within the directory of your git repo.
|
|
|
|
|
|
### Best practices for your own (and others) sanity
|
|
|
1. Add changes to your commit often.
|
|
|
2. Commit when-ever you step away from your work.
|
|
|
3. Try keep all changes in a commit related. The above is more important than this though.
|
|
|
4. Make your commit messages helpful. Short, but descriptive. Remember you can enter a 2nd line of text.
|
|
|
|
|
|
### Conclusion
|
|
|
You should now be able to manage and contribute to your project! Good luck, and if you spot anything wrong with the Guide, or have suggestions, please log an issue about it [here](https://git.cs.sun.ac.za/Computer-Science/git-beginners/issues).
|
|
|
|
|
|
## Links and Videos
|
|
|
Link | Description
|
|
|
--- | ---
|
|
|
[git - the simple guide](http://rogerdudler.github.io/git-guide/) | A short but decent guide. Helpful if you want to setup on your own PC. |
|
|
\ No newline at end of file |