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

minor changes to slides

parent 3ae54a0d
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ Modify and rename `addTwoNumbers.m` in the folder `src/firstCommit` as `addTwoNu ...@@ -39,7 +39,7 @@ Modify and rename `addTwoNumbers.m` in the folder `src/firstCommit` as `addTwoNu
```bash ```bash
$ cd src/firstCommit $ cd src/firstCommit
$ mv addTwoNumbers.m addTwoNumbers_myName.m $ git mv addTwoNumbers_myName.m addTwoNumbers_laurent.m # replace myName
``` ```
<br> <br>
...@@ -60,20 +60,21 @@ $ git status ...@@ -60,20 +60,21 @@ $ git status
<div class="fragment"> <div class="fragment">
<br> <br>
Now, add the file (bring it on stage) **ADVANCED**: see your changes in the terminal
```bash ```bash
$ git add addTwoNumbers_myName.m $ git diff
$ git status
# returns the same as before, generally in green (means staged)
``` ```
exit with `q`
<div class="fragment"> <div class="fragment">
<br> <br>
**ADVANCED**: see your changes in the terminal Now, add the file (bring it on stage)
```bash ```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 ## Add a commit message
...@@ -101,21 +102,18 @@ exit by typing `q` ...@@ -101,21 +102,18 @@ exit by typing `q`
## Do it yourself ## Do it yourself
* Modify and rename `secondCommit/multiplyTwoNumbers_myName.m` **Exercice 1:**
* Push the file `secondCommit/multiplyTwoNumbers_myName.m`
* Don't forget to edit <font color="red">`_myName`</font> * Edit the test in `test/suite`
<div class="fragment"> <div class="fragment">
<br> <br>
Commands: <img src="img/icon-live-demo.png" height="100px">
```bash
$ git checkout develop <div class="fragment">
$ git pull origin develop **Exercice 2:**
$ git checkout -b multiply-2-numbers
# make changes to file * Checkout a new branch named `multiply-2-numbers`
$ git add secondCommit/multiplyTwoNumbers_myName.m * Rename and modify `src/secondCommit/multiplyTwoNumbers_myName.m`
$ git commit -m "Corrected formula for multiplying 2 numbers" * Push the file `src/secondCommit/multiplyTwoNumbers_myName.m`
$ git status * Don't forget to edit <font color="red">`_myName`</font>
$ git push origin multiply-2-numbers \ No newline at end of file
$ git log # optional
```
## 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"> <div class="fragment">
<br> <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"> <div class="fragment">
<br> <br>
Don't forget to properly configure `git` with your username and email as explained in the training slides. 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 ## Detailed instructions
- First, fork the [https://git-r3lab.uni.lu/R3school/git.practice](https://git-r3lab.uni.lu/R3school/git.practice) repository. - First, fork the [https://git-r3lab.uni.lu/R3school/git.practice](https://git-r3lab.uni.lu/R3school/git.practice) repository.
......
...@@ -37,11 +37,6 @@ $ git push origin master ...@@ -37,11 +37,6 @@ $ git push origin master
``` ```
<div class="fragment"> <div class="fragment">
<br> Do the same for the `develop` branch.
Do the same for the `develop` branch<br>
(replace `master` with `develop`).
## Time to practice!
<img src="img/icon-live-demo.png" height="100px"> <img src="img/icon-live-demo.png" height="100px">
\ No newline at end of file
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