diff --git a/.gitignore b/.gitignore index 385c254da2603b3a636648b97f4a52ef3a6622c4..9ea79cb84fa69cf555ab0dcc68ab397e4d4782e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ +index.html +package-lock.json dist/ public/ -node_modules +node_modules/ dist *.log .sass-cache diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e6377942851c431458a9a802f88fb7f3bf5f6a0..2bc8b0a6b3f349d7e0503d0a584f3ebeb59d798f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,8 @@ pages: # build the develop version into latest - git checkout develop - - git pull origin develop + - git fetch origin develop + - git reset --hard origin/develop - grunt dist - mkdir latest - mv public/* latest/. diff --git a/index.html b/index.html deleted file mode 100644 index 7ebe98eb8ce0e6e3360d33f058cc88067d4abfd5..0000000000000000000000000000000000000000 --- a/index.html +++ /dev/null @@ -1,180 +0,0 @@ -<!doctype html> -<html lang="en"> - - <head> - <meta charset="utf-8"> - - <title>Basic git training</title> - - <meta name="apple-mobile-web-app-capable" content="yes" /> - <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> - - <link rel="stylesheet" href="bower_components/reveal.js/css/reveal.min.css"> - - <link rel="stylesheet" href="bower_components/reveal.js/css/theme/lcsb.css" id="theme"> - - <link rel="stylesheet" href="css/style.css"> - - <!-- For syntax highlighting --> - <link rel="stylesheet" href="bower_components/reveal.js/lib/css/zenburn.css" id="highlight-theme"> - - <!-- If the query includes 'print-pdf', use the PDF print sheet --> - <script> - document.write( '<link rel="stylesheet" href="bower_components/reveal.js/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' ); - </script> - - <!--[if lt IE 9]> - <script src="lib/js/html5shiv.js"></script> - <![endif]--> - - <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> - </head> - - <body> - - <div class="reveal"> - - <div class="slides"> - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/sbgBackgroundWhite.jpg" data-markdown="slides/index.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/overview.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/the_terminal.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/what_is_git.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/installation.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/essential_commands.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/github_gitlab.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/branches.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/best_practices.md"></section> - - - - - - - - <section data-separator="^\n\n\n" - data-vertical="^\n\n" - data-background="img/whiteBG.jpg" data-markdown="slides/thanks.md"></section> - - - - - - </div> - - </div> - - <script src="bower_components/reveal.js/lib/js/head.min.js"></script> - <script src="bower_components/reveal.js/js/reveal.min.js"></script> - <script> - // Configure Reveal - // Full list of configuration options available here: - // https://github.com/hakimel/reveal.js#configuration - Reveal.initialize({ - controls: true, - progress: true, - history: true, - center: true, - fragments: true, - - theme: Reveal.getQueryHash().theme, // available themes are in /css/theme - transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none - - // Optional libraries used to extend on reveal.js - dependencies: [ - { src: 'bower_components/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } }, - { src: 'bower_components/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: 'bower_components/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: 'bower_components/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, - { src: 'bower_components/reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }, - { src: 'bower_components/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }, - // { src: 'plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } } - //{ src: 'bower_components/reveal.js/plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } } - - { src: 'js/loadhtmlslides.js', condition: function() { return !!document.querySelector( '[data-html]' ); } } - ] - }); - </script> - - </body> - -</html> diff --git a/slides/homework.md b/slides/homework.md index e812373753aecf1e0a77ac9fdc628873c497504f..eba158fac1f4adbb4c737ac3b005025083c4f99e 100644 --- a/slides/homework.md +++ b/slides/homework.md @@ -1,26 +1,34 @@ ## Homework on GitLab -*This exercise has to be done on your lab computer on which `Matlab` **is** installed. Don't forget to properly configure `git` with your username and email, as we explained in the training slides.* +This exercise has to be done on your lab computer on which `Matlab` or `octave` **are** installed. +<div class="fragment"> <br> -During the training, you committed to the -<br> -[https://git-r3lab.uni.lu/git-training/practice](https://git-r3lab.uni.lu/git-training/practice) -repository. +More information on how install these software are on [mathworks.com](www.mathworks.com]) and on [gnu.org/software/octave](gnu.org/software/octave) +<div class="fragment"> <br> -Your task is to create a fork of this repository, commit some code and create a merge request on `GitLab`. +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/R3/R3.practice + - commit some code + - create a merge request on `GitLab`. -## Homework: instructions -- First, fork the [https://git-r3lab.uni.lu/git-training/practice](https://git-r3lab.uni.lu/git-training/practice) repository. +## Detailed instructions + +- First, fork the [https://git-r3lab.uni.lu/R3/R3.practice](https://git-r3lab.uni.lu/R3/R3.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`. -- Copy the `test.m` file to `test_myName.m` and change the names of the functions accordingly. +- Rename the `test.m` file in the `test/` directory to `test_myName.m`. + +- Edit the file `test.m` and change the names of the functions accordingly. - Before submitting the merge request, verify locally that your code is running properly. @@ -32,7 +40,7 @@ Your task is to create a fork of this repository, commit some code and create a - Create a merge-request. -- Assign either Laurent (@laurent.heirendt) or Sylvain (@sylvain.arreckx) depending on your group and your merge-request will be reviewed by one of us. +- Assign @laurent.heirendt and your merge-request will be reviewed. <br> That's it! diff --git a/slides/img/git_definition.png b/slides/img/git_definition.png new file mode 100644 index 0000000000000000000000000000000000000000..0676fc7a299fae5c7c3389eed91e21fcb050c629 Binary files /dev/null and b/slides/img/git_definition.png differ diff --git a/slides/img/installation.png b/slides/img/installation.png new file mode 100644 index 0000000000000000000000000000000000000000..dd278a70c5e8237d32c047759e47fb0812db9db0 Binary files /dev/null and b/slides/img/installation.png differ diff --git a/slides/index.md b/slides/index.md index a80758a691c067be6e29ad8c8525dc8d633fe67a..539414da24261f4211cfc315ec1db4b5100e500a 100644 --- a/slides/index.md +++ b/slides/index.md @@ -5,10 +5,11 @@ Absolute Beginners<br> <img src="img/logoLCSB.png" class="as-is" height="100px"> <br><br><br><br> -<br> +<br><br> -April 12th, 2017 +January 24th, 2019 -Sylvain Arreckx & Laurent Heirendt +**Laurent Heirendt, Ph.D.**<br> +laurent.heirendt@uni.lu <br><br><br><br> diff --git a/slides/installation.md b/slides/installation.md index 315f3d29f757ed85c388d36f1d1c2af0e2896458..258984f06e9917f97f858d35554ede049ebfff76 100644 --- a/slides/installation.md +++ b/slides/installation.md @@ -15,23 +15,19 @@ Install *Xcode Command Line Tools* <br> **Windows** -Follow instructions on *[git-for-windows.github.io](https://git-for-windows.github.io)*. - -**or:** `MobaXTerm` with `git` plugin: *[mobaxterm.mobatek.net](https://mobaxterm.mobatek.net)*. - -<small>More on *[git-scm.com/book/en/v2/Getting-Started-Installing-Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)*</small> +Install Git Bash: <br>`https://git-scm.com/download/win` ## How to start? **Linux (Ubuntu)** and **macOS** -Start the terminal (or any other shell) +Start the `Terminal` or `iTerm`. <br> **Windows** -Start `GUI Bash` or `MobaXTerm`. +Start `GUI Bash`. ## How to configure `git`? @@ -62,24 +58,53 @@ $ git config --list 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 https://github.com/userName/myRepo.git myRepo +$ git clone git@github.com:userName/myRepo.git myRepo ``` -<div class="fragment"> <br> -Clone the training repository with +If you did not configure your SSH key, clone using HTTPS: ```bash -$ git clone https://github.com/uni-lu/practice.git practice +$ git clone https://github.com/userName/myRepo.git myRepo ``` <br> You may be prompted to enter your credentials. -<div class="fragment"> + +## 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!'* diff --git a/slides/list.json b/slides/list.json index f4e8a89bfc1eeb1f98ebd2f99cb55c80e60bb842..860fa1bf8a7e3c56e4e30a067e5ef6aced39da23 100644 --- a/slides/list.json +++ b/slides/list.json @@ -17,6 +17,12 @@ "data-background": "img/whiteBG.jpg" } }, + { + "filename": "the_editor.md", + "attr": { + "data-background": "img/whiteBG.jpg" + } + }, { "filename": "what_is_git.md", "attr": { @@ -24,19 +30,19 @@ } }, { - "filename": "installation.md", + "filename": "github_gitlab.md", "attr": { "data-background": "img/whiteBG.jpg" } }, { - "filename": "essential_commands.md", + "filename": "installation.md", "attr": { "data-background": "img/whiteBG.jpg" } }, { - "filename": "github_gitlab.md", + "filename": "essential_commands.md", "attr": { "data-background": "img/whiteBG.jpg" } @@ -53,6 +59,12 @@ "data-background": "img/whiteBG.jpg" } }, + { + "filename": "homework.md", + "attr": { + "data-background": "img/whiteBG.jpg" + } + }, { "filename": "thanks.md", "attr": { diff --git a/slides/overview.md b/slides/overview.md index 9968e215c1d92df3c5899f2d6eda305674bdb12d..6d8a0f18ae637834b8c101f5366e387c5983dbc0 100644 --- a/slides/overview.md +++ b/slides/overview.md @@ -1,6 +1,7 @@ ## Overview -0. The Terminal +0. The terminal +1. The editor 1. What is `git`? What is the use of `git`? <!--(5 min)//--> 2. GitHub and GitLab <!--(5min)//--> 3. Installation of `git` diff --git a/slides/ready.md b/slides/ready.md index 8083fdaa8ddbc611f3e2933917370f0e3e44ef82..10bdd8c2d6487b004d59155128537a33ad3cf791 100644 --- a/slides/ready.md +++ b/slides/ready.md @@ -1,5 +1,5 @@ ## Ready to practice? -<br>Go to https://github.com/uni-lu/group_members +<br>Go to https://git-r3lab.uni.lu/R3.training/git.practice <br>And follow the instructions in the `README` file. diff --git a/slides/the_editor.md b/slides/the_editor.md new file mode 100644 index 0000000000000000000000000000000000000000..6de4cfcda120fd441a8bc70b9f57af7eac776d0d --- /dev/null +++ b/slides/the_editor.md @@ -0,0 +1,11 @@ +## The editor + +Recommended editors: + +- **Visual Studio Code** <br>(https://code.visualstudio.com) +- **Atom** <br>(https://atom.io) + + +## Visual Studio Code + +<br>(Live Demo) \ No newline at end of file diff --git a/slides/the_terminal.md b/slides/the_terminal.md index 30844f9443182e47adcbcfa2a5c41a9cd74c9c76..d63951188fe0e1e98328a138679be04b16b7c3a0 100644 --- a/slides/the_terminal.md +++ b/slides/the_terminal.md @@ -1,4 +1,26 @@ -## The Terminal (shell) +## The terminal (shell) + +<br> +**UNIX users (macOS & Linux):** + +Start the Terminal from your `/Applications` directoy. + +*Pro Tip:* Install iTerm2: <br>`https://www.iterm2.com` + +<br> +**Windows users:** + +Install Git Bash: <br>`https://git-scm.com/download/win` + +<br> +**Linux users:** + +Launch default terminal. +*Pro Tip:* Install Terminator: <br>`https://launchpad.net/terminator` + + + +## First steps in the terminal Starting the terminal presents itself with a line where you can enter a command ```bash diff --git a/slides/what_is_git.md b/slides/what_is_git.md index 8488d139447b8e405b22b7d15c47f8c467a98bd2..a0489ee7238b4a301b3f66e52b8b8b153056509c 100644 --- a/slides/what_is_git.md +++ b/slides/what_is_git.md @@ -16,7 +16,7 @@  <br><br> ``` -I'm an egotistical bastard, and I name all my projects after myself. +I'm an egotistical bastard, and I name all my projects after myself. First Linux, now git. ``` Linus Torvald (2007-06-14)