diff --git a/css/style.css b/css/style.css index 05ae57b0bc9d2624b36338545f73fb14d8b02e01..778eee3af854c6cc2d2efbdb2aaed12020d584b3 100644 --- a/css/style.css +++ b/css/style.css @@ -21,7 +21,7 @@ margin: 10px 0px; background: rgba(255, 255, 255, 0.12); border: 0px solid #000; - box-shadow: 0 0 5px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 0px rgba(0, 0, 0, 0.15); -webkit-transition: all .2s linear; -moz-transition: all .2s linear; -ms-transition: all .2s linear; diff --git a/img/branch-0-master.png b/img/branch-0-master.png deleted file mode 100644 index 8a9b18ae05bec4f4b2357480b283533432b974a5..0000000000000000000000000000000000000000 Binary files a/img/branch-0-master.png and /dev/null differ diff --git a/img/branch-1-checkout-b.png b/img/branch-1-checkout-b.png deleted file mode 100644 index f8d2fe25b34a732bf4a5e7208d676b1fb07d5897..0000000000000000000000000000000000000000 Binary files a/img/branch-1-checkout-b.png and /dev/null differ diff --git a/img/branch-2-commit.png b/img/branch-2-commit.png deleted file mode 100644 index 7a476ed29e562b6efe81ad971418c493d78f118a..0000000000000000000000000000000000000000 Binary files a/img/branch-2-commit.png and /dev/null differ diff --git a/img/branch-3-merge.png b/img/branch-3-merge.png deleted file mode 100644 index 74737e3e7b7c866a4030b226dcd0eca7b47c3eb1..0000000000000000000000000000000000000000 Binary files a/img/branch-3-merge.png and /dev/null differ diff --git a/img/branch-4-br-d.png b/img/branch-4-br-d.png deleted file mode 100644 index f8cbe0d018c8f04cdbe2861fd930dc060890fb04..0000000000000000000000000000000000000000 Binary files a/img/branch-4-br-d.png and /dev/null differ diff --git a/img/branch-commit.png b/img/branch-commit.png new file mode 100644 index 0000000000000000000000000000000000000000..76ddf1b058601775005bc041b08de7e348b2dba5 Binary files /dev/null and b/img/branch-commit.png differ diff --git a/img/branch-create.png b/img/branch-create.png new file mode 100644 index 0000000000000000000000000000000000000000..5bbe775f6aa9fce2b4602a0845eb2bd11eaf8a8d Binary files /dev/null and b/img/branch-create.png differ diff --git a/img/branch-i-state.graffle b/img/branch-i-state.graffle index 870a13fded89c8f2de0825efd7d8433a47eb650b..a346482195201ee5e59f918ac54c6336744fe6cb 100644 Binary files a/img/branch-i-state.graffle and b/img/branch-i-state.graffle differ diff --git a/img/branch-master.png b/img/branch-master.png new file mode 100644 index 0000000000000000000000000000000000000000..a30f3d76d63b0cd1353806b83e2635de5df0283e Binary files /dev/null and b/img/branch-master.png differ diff --git a/img/branch-merge.png b/img/branch-merge.png new file mode 100644 index 0000000000000000000000000000000000000000..8499c5dcf20033c032aed70f7925fc2e6acee6ac Binary files /dev/null and b/img/branch-merge.png differ diff --git a/img/git-i-state.graffle b/img/git-i-state.graffle deleted file mode 100644 index e0facebe5d37481525d5777d9cdb9a017e2bcba9..0000000000000000000000000000000000000000 Binary files a/img/git-i-state.graffle and /dev/null differ diff --git a/img/history_tracking.png b/img/history_tracking.png deleted file mode 100644 index ca8ab46a46f07e3c91bbd7510fee20696aaabc7f..0000000000000000000000000000000000000000 Binary files a/img/history_tracking.png and /dev/null differ diff --git a/img/history_tracking.pxm b/img/history_tracking.pxm deleted file mode 100644 index c7d55b2e5247c548ef7d3021902bfab4e34877f6..0000000000000000000000000000000000000000 Binary files a/img/history_tracking.pxm and /dev/null differ diff --git a/img/history_tracking_collaboration.png b/img/history_tracking_collaboration.png deleted file mode 100644 index 2dda29b1822762dab311df121289ea1b7614005c..0000000000000000000000000000000000000000 Binary files a/img/history_tracking_collaboration.png and /dev/null differ diff --git a/img/manual_version_control.png b/img/manual_version_control.png deleted file mode 100644 index 0d794b1c86fe049cdf3ca6359f8da9c8af6efb1d..0000000000000000000000000000000000000000 Binary files a/img/manual_version_control.png and /dev/null differ diff --git a/slides/branches.md b/slides/branches.md index 69f185de3ba65198c896886d08cdf6888819e2d9..4cf120ff7cf7a69aa35ba99f3c1747ff84b3f64b 100644 --- a/slides/branches.md +++ b/slides/branches.md @@ -3,7 +3,7 @@ Branch-off within the same repository in order to stay safe! The master branch: -<img src="img/branch-0-master.png" class="as-is" /> +<img src="img/branch-master.png" class="branch-master" /> ## One branch per feature @@ -14,7 +14,7 @@ $ git checkout -b matrix_vect_mult_myName ``` The `-b` flag creates the branch. -<img src="img/branch-1-checkout-b.png" class="as-is" /> +<img src="img/branch-create.png" class="branch-create" /> ## Switch between branches @@ -40,22 +40,23 @@ You can switch back to master with $ git checkout master ``` -<div class="fragment"> + <br> You can use the 5 essential commands as before. Only difference: you are on your own branch. +<img src="img/branch-commit.png" class="branch-commit" /> + ## Merge a branch If you want your feature on the `develop` or `master` branches, merge! -<br> **submit a MR or a PR** via the Github/Gitlab interface. +<img src="img/branch-merge.png" class="branch-merge" /> <div class="fragment"> -<br> **ADVANCED**: You can see the differences between branches ```sh $ git diff master..matrix_vect_mult_myName diff --git a/slides/essential_commands.md b/slides/essential_commands.md index f1e3117782c2eaebcfa83488870938a4aecc5424..2b29de7d5970cbee547b59515fcbca1e1eb51d93 100644 --- a/slides/essential_commands.md +++ b/slides/essential_commands.md @@ -95,7 +95,7 @@ $ git pull ``` -## Push your file to the folder +## Push your file to the repository ```sh $ git push diff --git a/slides/forks.md b/slides/forks.md index 0249eadec9b8b96f8ce2be6134e3b94652f8c1a8..79ad368dd32de4c7afb9e3b9575c7f64e5cc933b 100644 --- a/slides/forks.md +++ b/slides/forks.md @@ -1,35 +1,78 @@ -## Fork +## Forks -<img src="img/remote-0-master.png" class="as-is" /> +You **fork** when you want to work on a public repository or a protected repository. -<img src="img/remote-1-remote.png" class="as-is" /> +Remember: -## Ajouter une _remote_ +- A **fork** is your own **copy** of a repository. +- A **fork** can have multiple **branches** +- A **fork** is not a **branch**, but can have multiple **branches**. -```shell -$ git remote add origin git@github.com:<user>/<proj>.git -$ git remote -v + +## Fork on GitLab + + +## Fork on GitHub + + +## Clone your fork + +Clone first: +```sh +$ git clone https://git-r3lab.uni.lu/myGroup/myRepo.git forkMyRepo ``` +<br> +then, you can change to the directory: +```sh +$ cd forkMyRepo +``` -```shell -$ git push origin master + +## Add the address of the original repository + +Add the `upstream` (where you copied from) +```sh +$ git remote add upstream https://git-r3lab.uni.lu/origGroup/origRepo.git ``` -<img src="img/remote-2-push.png" class="as-is" /> +<br> +You can then check whether the remote address is set correctly: +```sh +$ git remote -v +``` +<!-- <img src="img/remote-0-master.png" class="as-is" /> //--> +<!-- <img src="img/remote-1-remote.png" class="as-is" /> //--> +<!--- <img src="img/remote-2-push.png" class="as-is" /> //--> -## Récupérer les changements -```shell -$ git checkout master # Aller sur la branche master -$ git status # Est-ce propre? (Bien sûr!) -$ git pull origin master # Récupérer le travail - # de l'équipe +## Synchronize your fork + +```sh +$ git checkout master +$ git status ``` +<div class="fragment"> +<br> +Fetch the changes from upstream (similar to pull) +```sh +$ git fetch upstream +``` -## _Sync Branch_ -Terminologie de l'application GitHub +<div class="fragment"> +<br> +Merge the retrieved changes +```sh +$ git merge upstream/master +``` + +<div class="fragment"> +<br> +Push the changes to your own fork: +```sh +$ git push origin master +``` ## Pull/Merge Requests diff --git a/slides/installation.md b/slides/installation.md index deff9b919f26417ff6ac6c38f76df4a7e01856bc..b33ba488830d5789c9c3f25e1446c07b402ccae7 100644 --- a/slides/installation.md +++ b/slides/installation.md @@ -44,7 +44,7 @@ $ git config --global user.email "first.last@uni.lu" ## Does it work? -```shell +```sh $ git --version # git version 2.10.0 ``` @@ -77,7 +77,7 @@ Any other rudimentary method such as shall **be avoided**! -## How do I `clone` any other repository? +## How do I `clone` a repository? You can clone any other repository with: ```sh