diff --git a/slides/essential_commands.md b/slides/essential_commands.md index 8da014a860cffd4222990bd3eb3bc1ac2f95328b..4f7c47d59e963601c102ad7c417527f4549139d5 100644 --- a/slides/essential_commands.md +++ b/slides/essential_commands.md @@ -17,9 +17,9 @@ $ git push <remote> <branch> ``` -## Pull the latest version of an existing repository +## Pull the latest version of an existing branch -Then, pull the latest revision: +Pull the latest revision on branch `add-2-numbers`: ```bash $ git pull origin add-2-numbers # Already up to date @@ -46,7 +46,7 @@ $ mv addTwoNumbers.m addTwoNumbers_myName.m Open the file using the `Visual Studio Code` editor (or any other editor) and correct the line ```Matlab -c = a + b; +c = a - b; ``` @@ -62,7 +62,8 @@ $ git status <br> Now, add the file (bring it on stage) ```bash -$ git add firstCommit/addTwoNumbers_myName.m +$ git add addTwoNumbers_myName.m +$ git status #Â returns the same as before, generally in green (means staged) ``` @@ -78,21 +79,15 @@ exit with `q` ## Add a commit message ```bash -$ git commit -m "Uncommented line for adding 2 numbers" +$ git commit -m "Correcting formula for adding 2 numbers" $ git status ``` -<br> -You can pull, even at this stage, new possible changes -```bash -$ git pull -``` - -## Push your file to the repository +## Push your file to your fork ```bash -$ git push +$ git push origin add-2-numbers ``` <div class="fragment"> @@ -106,19 +101,21 @@ exit by typing `q` ## Do it yourself -* Modify and rename `secondCommit/multiplyTwoNumbers.m` +* Modify and rename `secondCommit/multiplyTwoNumbers_myName.m` * Push the file `secondCommit/multiplyTwoNumbers_myName.m` -* Don't forget to add <font color="red">`_myName`</font> +* Don't forget to edit <font color="red">`_myName`</font> <div class="fragment"> <br> Commands: ```bash -$ git pull -$ git diff #Â optional +$ 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 "Uncommented line for multiplying 2 numbers" +$ git commit -m "Corrected formula for multiplying 2 numbers" $ git status -$ git push +$ git push origin multiply-2-numbers $ git log # optional ``` diff --git a/slides/homework.md b/slides/homework.md index eba158fac1f4adbb4c737ac3b005025083c4f99e..018219262f90d45d3a86f6ad97a3a3d58fe6befb 100644 --- a/slides/homework.md +++ b/slides/homework.md @@ -13,20 +13,20 @@ Don't forget to properly configure `git` with your username and email as explain ## Task - - create a fork of the repository <br>https://git-r3lab.uni.lu/R3/R3.practice + - 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/R3/R3.practice](https://git-r3lab.uni.lu/R3/R3.practice) repository. +- First, fork the [https://git-r3lab.uni.lu/R3school/git.practice](https://git-r3lab.uni.lu/R3school/git.practice) repository. - Create the new branch `homework_myName`. -- Implement a new function (create a new file `sqrt_myName.m`) called `sqrt_myName(x)` that computes the square root of `x`. +- Implement a new function (create a new file `sqrt_myName.m` in a new folder `src/thirdCommit`) called `sqrt_myName(x)` that computes the square root of `x`. -- Rename the `test.m` file in the `test/` directory to `test_myName.m`. +- Rename the `test.m` file in the `test/suite` directory to `test_myName.m`. - Edit the file `test.m` and change the names of the functions accordingly. diff --git a/slides/index.md b/slides/index.md index 539414da24261f4211cfc315ec1db4b5100e500a..2bdf8acc8780803b25a444b69000b9f89c3c9e3d 100644 --- a/slides/index.md +++ b/slides/index.md @@ -1,8 +1,6 @@ -Absolute Beginners<br> -<img src="img/Git-Logo-Black.png" class="as-is" height="100px"><br>Workshop -<br> +<img src="img/Git-Logo-Black.png" class="as-is" height="100px"><br>Training for absolute beginners -<img src="img/logoLCSB.png" class="as-is" height="100px"> +<img src="img/r3-training-logo.png" class="as-is" height="200px"> <br><br><br><br> <br><br> diff --git a/slides/merge.md b/slides/merge.md index 02b0e99f68b2eb72df14f07829ec2b2106571963..ae1199efc7e1fd5016697d26cc4d9bf2c979c62f 100644 --- a/slides/merge.md +++ b/slides/merge.md @@ -1,4 +1,3 @@ - ## Merge a branch If you want your feature on the `develop` or `master` branches, @@ -9,35 +8,9 @@ Use the **interface** to make use of your peers to review your code! <img src="img/branch-merge.png" class="branch-merge" /> + <br> Once merged, you can delete the branch via the interface. - -## Github interface -<img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png" alt="GitHub" style="width: 100px;"/> - -Detailed information is on [help.github.com/articles/creating-a-pull-request/](https://help.github.com/articles/creating-a-pull-request/). - -1. Click on **New pull request** - - -<br><br> -2. Compare the branches - - - - -<ol start="3"> - <li>Assign your peer - <br> - -  - </li> -</ol> - - -<ol start="4"> - <li>Submit the PR - - </li> -</ol> +<br> +(Live Demo) \ No newline at end of file diff --git a/slides/thanks.md b/slides/thanks.md index c88cfb83f47ad22d3d1351b12b82914253da7f92..7337d53f0c95ed0f7d3bca99e1b6afa1cb59552b 100644 --- a/slides/thanks.md +++ b/slides/thanks.md @@ -30,3 +30,12 @@ https://git-scm.com/book/en/v2 <br>[3]: Cheat sheet: http://rogerdudler.github.io/git-guide + +## Thank you. + +<img src="img/r3-training-logo.png" height="200px"> + +Contact us if you need help: + +r3lab.core@uni.lu +