Skip to content
Snippets Groups Projects
Commit e2f47533 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Updated slides

parent 0023d1e0
No related branches found
No related tags found
2 merge requests!18merge all,!9Updated slides
## The 5 essential commands
`pull, status, add, commit, push`
note:
Put your speaker notes here.
You can see them pressing 's'.
Fullscreen can be activated by typing 'f'.
<br>
**Yes**, you only need 5 commands!
<br>
`pull, status, add, commit, push`
<br>
or in other words (more technically)
```shell
$ git init
$ git pull
$ git status
$ git add
$ git diff
$ git commit
$ git log
$ git add myFile.txt
$ git commit -m "myMessage"
$ git push
```
note:
Voici les commandes que nous allons apprendre
## Nouveau projet : Listes
<div class="fragment">
Créer l'espace de travail
```shell
......@@ -31,7 +27,6 @@ $ mkdir workspace
$ cd workspace
```
<div class="fragment">
Puis le dossier du nouveau projet
```shell
......
## Remote
Parlons de dépôt *distant*
## Fork
<img src="img/remote-0-master.png" class="as-is" />
<img src="img/remote-1-remote.png" class="as-is" />
## Héberger un dépôt distant ?
Github (Ou [BitBucket](https://bitbucket.org/))
## Ajouter une _remote_
```shell
......@@ -41,12 +32,30 @@ $ git pull origin master # Récupérer le travail
Terminologie de l'application GitHub
## Conflits
## Avoid conflicts
Good practice:
## Pull Requests
Ou comment utiliser GitHub pour vos revues de code
<large>**PULL**</large> before you **push**!
Do **not** combine `git` commands
```sh
$ git commit -am "myMessage" # do not do this
```
Verify to have the right remote set on your fork
```sh
$ git remote -v
```
## Fork
Contribuez à l'open source
Keep your fork up-to-date
```sh
$ git fetch upstream
$ git merge upstream/master
$ git push origin master # do not do git push (!)
```
## Pull Requests
How to submit a Pull Request (PR)
......@@ -11,3 +11,9 @@ Positive point: GitHub and GitLab are (almost) the same.
## GitLab
## Good practices
Always `clone` a repository, do not download the `.zip` file.
<img src="img/Git-Logo-Black.png" class="as-is" height="100px">training
<br><br>
**SBG and MSP groups**
**SBG & MSP groups**
<img src="img/logoLCSB.png" class="as-is" height="100px">
......@@ -46,3 +46,7 @@ PR, issues (on a dummy test repo)
- Task 2: Push to forked repo and create a PR
- Bonus Task: Fork the cobratoolbox and update
- Friday: 1h debriefing
Put your speaker notes here.
You can see them pressing 's'.
Fullscreen can be activated by typing 'f'.
......@@ -26,19 +26,19 @@ Follow instructions on *[git-for-windows.github.io](https://git-for-windows.gith
**Linux (Ubuntu)** and **macOS**
Start the terminal
Start the terminal (or any other shell)
<br>
**Windows**
Start `GUI Bash` or, if installed, `MobaXTerm`.
Start `GUI Bash` or `MobaXTerm`.
## Configuration
## How to configure `git`?
```shell
$ git config --global user.name "Firstname Lastname"
$ git config --global user.email "first.last@uni.lu"
$ git config -l
```
......@@ -48,3 +48,30 @@ $ git config -l
$ git --version
# git version 2.10.0
```
## Test the configuration
Test whether your username and email have been registered
```sh
$ git config -l
```
<br>
This should list the configuration with `user.name` and `user.email`.
## I need to get `The COBRAToolbox` - How?
Simply `clone` the repository (i.e., retrieve a copy)
```sh
$ git clone https://github.com/opencobra/cobratoolbox.git cobratoolbox
```
Any other rudimentary method such as
*'I simply download the `.zip` un unzip it - works like a charm!'*
shall **be avoided**!
......@@ -2,7 +2,7 @@
Starting the terminal presents itself with a line where you can enter a command:
```sh
michael@myComputer>
cesar@myComputer>
```
Often written, for covenience, as:
```sh
......
......@@ -2,10 +2,10 @@
![](img/git_definition.png)
`git` is a **version control system** (VCS) for tracking changes in computer files and coordinating work on those files among multiple people [1].
Designed and implemented in 2005 by **Linus Torvalds**
![](img/linus.jpg)
`git` is a **version control system** (VCS) for tracking changes in computer files and coordinating work on those files among multiple people [1].
<div align="left"><small>[1] *https://en.wikipedia.org/wiki/Git*</small></div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment