Commit 361e4488 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

new slides on installation and configuration

parent f9ed580e
## How do I start working on a repository?
You have to `clone` it first:
```bash
$ git clone git@github.com:userName/myRepo.git myRepo
```
<div class="fragment">
<br>
If you did not configure your SSH key, clone using HTTPS:
```bash
$ git clone https://github.com/userName/myRepo.git myRepo
```
<br>
<div class="fragment">
You will be prompted to enter your credentials.
## Clone the practice repository
(Live Demo)
<br>
Clone the training repository! <br><br>
https://git-r3lab.uni.lu/R3.training/git.practice
<div class="fragment">
<br><br>
Any other rudimentary method such as
*'I simply download the `.zip` un unzip it - works like a charm!'*
shall **be avoided**!
## How to configure `git`?
```bash
$ git config --global user.name "Firstname Lastname"
$ git config --global user.email "first.last@uni.lu"
```
## Test the configuration
Test whether your username and email have been registered
```bash
$ git config --list
```
<br>
This should list the configuration with `user.name` and `user.email`.
## What is an SSH key?
An SSH key is a secure access credential.
## Why do I need an SSH key?
<br>
**Idea**: <br><br>
communicate **securely** with Github/Gitlab **without** entering the username/password.
## How do I get and set my SSH key?
<br>
Check if you already have an SSH key:
```bash
$ ls -al ~/.ssh
```
<br>
If there is a file with an extension `.pub`, you already have an SSH key.
<div class="fragment">
<br><br>
If you don’t have yet an SSH key, you have to generate one:
```bash
$ ssh-keygen -t rsa
```
<br>
Then, add the SSH key to Github/Gitlab (see demo).
## Installation
## Installation of `git`
<img src="img/github_app.png" class="as-is" height="200" />
**Linux (Ubuntu)**
```bash
$ sudo apt-get install git-all
```
<br>
**macOS**
Install *Xcode Command Line Tools*
......@@ -17,8 +11,15 @@ Install *Xcode Command Line Tools*
Install Git Bash: <br>`https://git-scm.com/download/win`
<br>
**Linux (Ubuntu)**
```bash
$ sudo apt-get install git-all
```
## How to start?
## How to get started?
**Linux (Ubuntu)** and **macOS**
......@@ -30,84 +31,9 @@ Start the `Terminal` or `iTerm`.
Start `GUI Bash`.
## How to configure `git`?
```bash
$ git config --global user.name "Firstname Lastname"
$ git config --global user.email "first.last@uni.lu"
```
## Does it work?
## Is `git` properly installed?
```bash
$ git --version
# git version 2.10.0
```
## Test the configuration
Test whether your username and email have been registered
```bash
$ git config --list
```
<br>
This should list the configuration with `user.name` and `user.email`.
## How to set my SSH key?
Check if you already have an SSH key:
```bash
$ ls -al ~/.ssh
```
If there is a file with an extension `.pub`, you already have an SSH key.
<div class="fragment">
<br><br>
If you don’t have yet an SSH key, you have to generate one:
```bash
$ ssh-keygen -t rsa
```
<br>
Then, add the SSH key to Github/Gitlab (see demo).
## How do I `clone` a repository?
You can clone a repository with
```bash
$ git clone git@github.com:userName/myRepo.git myRepo
```
<br>
If you did not configure your SSH key, clone using HTTPS:
```bash
$ git clone https://github.com/userName/myRepo.git myRepo
```
<br>
You may be prompted to enter your credentials.
## Clone the practice repository
(Live Demo)
<br>
Clone the training repository! <br><br>
https://git-r3lab.uni.lu/R3.training/git.practice
<div class="fragment">
<br><br>
Any other rudimentary method such as
*'I simply download the `.zip` un unzip it - works like a charm!'*
shall **be avoided**!
```
\ No newline at end of file
......@@ -41,6 +41,18 @@
"data-background": "img/whiteBG.jpg"
}
},
{
"filename": "configuration.md",
"attr": {
"data-background": "img/whiteBG.jpg"
}
},
{
"filename": "cloneRepo.md",
"attr": {
"data-background": "img/whiteBG.jpg"
}
},
{
"filename": "essential_commands.md",
"attr": {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment