From 836859928e02e2779af4fcc78acbd32d24c0daa7 Mon Sep 17 00:00:00 2001 From: laurentheirendt <laurent.heirendt@uni.lu> Date: Wed, 23 Jan 2019 21:36:16 +0100 Subject: [PATCH] minor changes to slides --- essential_commands.md | 44 +++++++++++++++++++++---------------------- homework.md | 13 +++---------- syncFork.md | 7 +------ 3 files changed, 25 insertions(+), 39 deletions(-) diff --git a/essential_commands.md b/essential_commands.md index 4f7c47d5..b0a42e16 100644 --- a/essential_commands.md +++ b/essential_commands.md @@ -39,7 +39,7 @@ Modify and rename `addTwoNumbers.m` in the folder `src/firstCommit` as `addTwoNu ```bash $ cd src/firstCommit -$ mv addTwoNumbers.m addTwoNumbers_myName.m +$ git mv addTwoNumbers_myName.m addTwoNumbers_laurent.m # replace myName ``` <br> @@ -60,20 +60,21 @@ $ git status <div class="fragment"> <br> -Now, add the file (bring it on stage) +**ADVANCED**: see your changes in the terminal ```bash -$ git add addTwoNumbers_myName.m -$ git status -#Â returns the same as before, generally in green (means staged) +$ git diff ``` +exit with `q` <div class="fragment"> <br> -**ADVANCED**: see your changes in the terminal +Now, add the file (bring it on stage) ```bash -$ git diff +$ git add addTwoNumbers_laurent.m # replace myName +$ git status +#Â returns the same as before, generally in green (means staged) ``` -exit with `q` + ## Add a commit message @@ -101,21 +102,18 @@ exit by typing `q` ## Do it yourself -* Modify and rename `secondCommit/multiplyTwoNumbers_myName.m` -* Push the file `secondCommit/multiplyTwoNumbers_myName.m` -* Don't forget to edit <font color="red">`_myName`</font> +**Exercice 1:** + +* Edit the test in `test/suite` <div class="fragment"> <br> -Commands: -```bash -$ git checkout develop -$ git pull origin develop -$ git checkout -b multiply-2-numbers -# make changes to file -$ git add secondCommit/multiplyTwoNumbers_myName.m -$ git commit -m "Corrected formula for multiplying 2 numbers" -$ git status -$ git push origin multiply-2-numbers -$ git log # optional -``` +<img src="img/icon-live-demo.png" height="100px"> + +<div class="fragment"> +**Exercice 2:** + +* Checkout a new branch named `multiply-2-numbers` +* Rename and modify `src/secondCommit/multiplyTwoNumbers_myName.m` +* Push the file `src/secondCommit/multiplyTwoNumbers_myName.m` +* Don't forget to edit <font color="red">`_myName`</font> \ No newline at end of file diff --git a/homework.md b/homework.md index 01821926..7228cf29 100644 --- a/homework.md +++ b/homework.md @@ -1,23 +1,16 @@ -## Homework on GitLab +## Homework -This exercise has to be done on your lab computer on which `Matlab` or `octave` **are** installed. +Ideally, do this exercise on a computer on which `Matlab` or `octave` **are** installed. <div class="fragment"> <br> -More information on how install these software are on [mathworks.com](www.mathworks.com]) and on [gnu.org/software/octave](gnu.org/software/octave) +More information on how install these software are on [mathworks.com](www.mathworks.com]) or on [gnu.org/software/octave](gnu.org/software/octave) <div class="fragment"> <br> Don't forget to properly configure `git` with your username and email as explained in the training slides. -## Task - - - create a fork of the repository <br>https://git-r3lab.uni.lu/R3school/git.practice - - commit some code - - create a merge request on `GitLab`. - - ## Detailed instructions - First, fork the [https://git-r3lab.uni.lu/R3school/git.practice](https://git-r3lab.uni.lu/R3school/git.practice) repository. diff --git a/syncFork.md b/syncFork.md index aacd622f..3cfbd94a 100644 --- a/syncFork.md +++ b/syncFork.md @@ -37,11 +37,6 @@ $ git push origin master ``` <div class="fragment"> -<br> -Do the same for the `develop` branch<br> -(replace `master` with `develop`). - - -## Time to practice! +Do the same for the `develop` branch. <img src="img/icon-live-demo.png" height="100px"> \ No newline at end of file -- GitLab