... | ... | @@ -11,7 +11,9 @@ If you are looking for GitLab's docs? They are **[here.](https://git.cs.sun.ac.z |
|
|
## Git quick reference
|
|
|
This is a quick reminder of the basic commands.
|
|
|
|
|
|
A more complete "cheat-sheet" can be found **[here](https://about.gitlab.com/images/press/git-cheat-sheet.pdf)**. This is a very good summary, and you are encouraged to have it open or printed out for your reference. **[Here](https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html)** is another good guide.
|
|
|
A more complete "cheat-sheet" can be found **[here](https://about.gitlab.com/images/press/git-cheat-sheet.pdf)**.
|
|
|
|
|
|
The above is a very good summary, and you are encouraged to have it open or printed out for your reference. **[Here](https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html)** is another good guide.
|
|
|
|
|
|
### Setup
|
|
|
Command | Effect
|
... | ... | @@ -19,7 +21,8 @@ Command | Effect |
|
|
`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 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 "vim" ` | Set the default commit message editor to `vim`.
|
|
|
|
|
|
### Simple Git flow
|
|
|
Command | Effect
|
... | ... | @@ -36,10 +39,10 @@ This section is aimed towards first time users of both Git and this instance of |
|
|
|
|
|
### 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/)'
|
|
|
> "[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)'
|
|
|
> "[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,
|
... | ... | @@ -71,4 +74,10 @@ Next, we will need to add your SSH key so that you can `clone` a copy of the pro |
|
|
|
|
|
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.
|
|
|
|
|
|
### Links and Videos |
|
|
\ No newline at end of file |