diff --git a/best_practices.md b/best_practices.md index 91ca870bd5f3e722ad31083ca18c0647ade7272a..bafee3744301cfe7ccc85b7288adc50c006581b1 100644 --- a/best_practices.md +++ b/best_practices.md @@ -12,27 +12,20 @@ * `clone` a repository, do not download the `.zip` file. + * Do **not** combine `git` commands ```bash $ git commit -am "myMessage" # do not do this ``` * Stage only 1 file at once using + ```bash $ git add myFile.txt ``` - * Commit **only a few files** at once (after multiple separate `git add` commands) -* Always **sync your fork** before starting to work on a new branch - ```bash - $ git remote -v # verify to have the right remote set - $ git fetch upstream - $ git merge upstream/master - $ git push origin master # do not do git push (!) - ``` - * `Push` often - avoid conflicts <br><br> diff --git a/branches.md b/branches.md index 6a5eaf044bf1ff09a5d205418c3f68111c45e53f..b00b94f266f617208f63b83987ac1ba564f9ae4d 100644 --- a/branches.md +++ b/branches.md @@ -84,36 +84,6 @@ Use the **interface** to make use of your peers to review your code! Once merged, you can delete the branch via the interface. -## Gitlab interface -<img src="https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo.png" alt="GitLab" style="width: 100px;"/> - -Detailed information is on [docs.gitlab.com/ce/gitlab-basics/add-merge-request.html](https://docs.gitlab.com/ce/gitlab-basics/add-merge-request.html). - -1. Click on **New merge request** - - -<br><br> -2. Compare the branches - - - - -<ol start="3"> - <li>Assign your peer - <br> - -  - </li> -</ol> - - -<ol start="4"> - <li>Submit the MR - - </li> -</ol> - - ## Github interface <img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png" alt="GitHub" style="width: 100px;"/> diff --git a/essential_commands.md b/essential_commands.md index 96a4ab9ca888c5f70823a1ba7de289fb4d7c38d9..43bde21dbe1853767cff601bf054f8a2c11dd323 100644 --- a/essential_commands.md +++ b/essential_commands.md @@ -36,6 +36,15 @@ $ git status ``` +## Be safe and create a new branch + +(more on branches in a few minutes) +<br><br><br><br><br> +```bash +$ git checkout -b matrix_vect_mult_myName +``` + + ## Modify a file Modify and rename `addTwoNumbers.m` in the folder `firstCommit` @@ -81,7 +90,7 @@ $ git add firstCommit/addTwoNumbers_myName.m ```bash $ git diff ``` -exit with `:q` +exit with `q` ## Add a commit message @@ -112,10 +121,6 @@ $ git log ``` exit by typing `q` -<div class="fragment"> -<br><br> -You just pushed to `master`. This is **not a good** practice (more later!). - ## Do it yourself diff --git a/github_gitlab.md b/github_gitlab.md index ea5e300d8dee6246fb4012881022f15abd4b9b2e..920ba0e78a611a2495b15bd30d7e2a3f4298be87 100644 --- a/github_gitlab.md +++ b/github_gitlab.md @@ -21,5 +21,3 @@ Positive point: GitHub and GitLab are (almost) the same. [https://git-r3lab.uni.lu](https://git-r3lab.uni.lu) <br><img src="https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-extra-whitespace.png" alt="GitLab" style="width: 200px;"/> - -## Open an issue (Live Demo) diff --git a/installation.md b/installation.md index d50e033498ec7bfa7735c8491cf8209a75094896..315f3d29f757ed85c388d36f1d1c2af0e2896458 100644 --- a/installation.md +++ b/installation.md @@ -73,7 +73,7 @@ $ git clone https://github.com/userName/myRepo.git myRepo <br> Clone the training repository with ```bash -$ git clone https://git-r3lab.uni.lu/git-training/practice.git practice +$ git clone https://github.com/uni-lu/practice.git practice ``` <br> You may be prompted to enter your credentials. diff --git a/list.json b/list.json index 21d7166127ba7694cf01a6d8f3753e2e8685e89c..1e09f925c05a840f51a47256af93b944d4e84a5c 100644 --- a/list.json +++ b/list.json @@ -58,11 +58,5 @@ "attr": { "data-background": "../img/whiteBG.jpg" } - }, - { - "filename": "ready.md", - "attr": { - "data-background": "../img/whiteBG.jpg" - } } ] diff --git a/what_is_git.md b/what_is_git.md index 649f5c9462ab97edaa9ebd5ef6514ec9860b3d91..8488d139447b8e405b22b7d15c47f8c467a98bd2 100644 --- a/what_is_git.md +++ b/what_is_git.md @@ -11,6 +11,17 @@ <div align="left"><small>[1] *https://en.wikipedia.org/wiki/Git*</small></div> +## Funny story + + +<br><br> +``` +I'm an egotistical bastard, and I name all my projects after myself. +First Linux, now git. +``` +Linus Torvald (2007-06-14) + + ## What is the use of `git`? * No need to fully rewrite code; **reuse code** and **save time**