diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/branches.md b/2019/2019-10-03_basicGitTraining-SIU/slides/branches.md index 0c91358cb047d118836dd31d9e93cf8655f06601..fd80a048e71c523cd55edc5ddb0e6d840f963ecf 100644 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/branches.md +++ b/2019/2019-10-03_basicGitTraining-SIU/slides/branches.md @@ -70,7 +70,7 @@ If the local branch does not exist but the remote does, it is created automatica -# Create your own version +# Create your own version (i) Assume that you want to work on a file: @@ -87,12 +87,11 @@ The `-b` flag creates the branch. Locally, you have your own version now: +# Create your own version (ii) + Push your version to your fork: ```bash $ git push origin myBranch ``` - -<div class="fragment"> - <img src="slides/img/icon-live-demo.png" height="100px"> diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/cloneRepo.md b/2019/2019-10-03_basicGitTraining-SIU/slides/cloneRepo.md deleted file mode 100644 index 887a6e087e73a14ef7ad3790f9e7d0d67ce04b14..0000000000000000000000000000000000000000 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/cloneRepo.md +++ /dev/null @@ -1,14 +0,0 @@ -# How do I start working on a repository? - -You have to `clone` it first: - -```bash -$ git clone git@github.com:userName/myRepo.git myRepo -``` - -If you did not configure your SSH key, clone using HTTPS: -```bash -$ git clone https://github.com/userName/myRepo.git myRepo -``` - -You will be prompted to enter your credentials. diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/essential_commands.md b/2019/2019-10-03_basicGitTraining-SIU/slides/essential_commands.md index 0fa56f47884b92c3b64762cf696fed6f7a014b7b..9b18864f74d67f9c8c96639dfb2f3497b9c9c8da 100644 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/essential_commands.md +++ b/2019/2019-10-03_basicGitTraining-SIU/slides/essential_commands.md @@ -35,11 +35,11 @@ $ git status # Modify a file -Copy the file `template.md` in the folder `_attendees` and rename it with your firstname: +Copy the file `firstNameLastname.md` in the folder `_attendees` and rename it with your first and last names: ```bash $ cd _attendees -$ cp template.md myName.md +$ cp firstNameLastname.md myName.md ``` Then, make your changes with your favorite editor! diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/forks.md b/2019/2019-10-03_basicGitTraining-SIU/slides/forks.md index 3a4f61cd17127ecdde35fe52154da3d65b0a94bf..6690f36ad1d3160f7fe8b0d12d42e589835edae3 100644 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/forks.md +++ b/2019/2019-10-03_basicGitTraining-SIU/slides/forks.md @@ -1,37 +1,34 @@ # What is a `fork`? -<img src="slides/img/fork.jpg" class="as-is" height="500em"/> +<center><img src="slides/img/fork.jpg" class="as-is" height="500em"/></center> <!--http://www.cndajin.com/data/wls/246/22302193.jpg--> # Not really ... -<img src="slides/img/fork-crossed.png" class="as-is" height="500em"/> +<center><img src="slides/img/fork-crossed.png" class="as-is" height="500em"/></center> # What is a `fork`? -In general, when contributing to a repository, you only have **read** access. +- In general, when contributing to a repository, you only have **read** access. -In other words, you can only **pull** (unless it is your own repository or access has been granted). +- In other words, you can only **pull** (unless it is your own repository or access has been granted). -In general, you **cannot write** changes. In other words, you do not have **push** access. +- In general, you **cannot write** changes. In other words, you do not have **push** access. -You have to work on your **own copy**. +- You have to work on your **own copy**. -In other words, you have to work on your own <font color="red">**fork**</font>. +- In other words, you have to work on your own <font color="red">**fork**</font>. - - -# How to get a fork? +<h2>How to get a fork?</h1> Browse to the original repository and click on the button `Fork`:  -<img src="slides/img/icon-live-demo.png" height="100px"> @@ -42,8 +39,6 @@ https://github.com/LCSB-BioCore/basic-git-practice Then, clone your fork to your home directory! -<img src="slides/img/icon-live-demo.png" height="100px"> - ```bash $ git clone git@github.com:<yourName>/basic-git-practice.git ``` @@ -53,6 +48,13 @@ Change to the practice directory with: $ cd basic-git-practice ``` +<img src="slides/img/icon-live-demo.png" height="100px"> + +If you did not configure your SSH key, clone using HTTPS: +```bash +$ git clone https://github.com/userName/basic-git-practice.git basic-git-practice +``` + # A note on shortcuts ... diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/github_gitlab.md b/2019/2019-10-03_basicGitTraining-SIU/slides/github_gitlab.md index 84930c3922e96a6f2bb75d3ed85881aa19c2e2de..7defad992cab35d15d54277b2a6f050a074291f7 100644 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/github_gitlab.md +++ b/2019/2019-10-03_basicGitTraining-SIU/slides/github_gitlab.md @@ -14,5 +14,4 @@ Positive point: GitHub and GitLab are (almost) the same. - **GitHub**: [https://github.com](https://github.com) -- Public GitLab: [https://gitlab.com](https://gitlab.com) -- LCSB specific: [https://git-r3lab.uni.lu](https://git-r3lab.uni.lu) \ No newline at end of file +- **GitLab**: [https://gitlab.com](https://gitlab.com) \ No newline at end of file diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/list.json b/2019/2019-10-03_basicGitTraining-SIU/slides/list.json index fb1e3e569317d9688e9aa189cfaddfb4dda6cae8..954b68de19e2a0a67c2fce9e15b581ef5ded7925 100644 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/list.json +++ b/2019/2019-10-03_basicGitTraining-SIU/slides/list.json @@ -2,9 +2,8 @@ { "filename": "index.md" }, { "filename": "overview.md" }, { "filename": "what_is_git.md" }, - { "filename": "the_terminal.md" }, { "filename": "github_gitlab.md" }, - { "filename": "cloneRepo.md" }, + { "filename": "the_terminal.md" }, { "filename": "forks.md" }, { "filename": "branches.md" }, { "filename": "essential_commands.md" }, diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/overview.md b/2019/2019-10-03_basicGitTraining-SIU/slides/overview.md index 794651a658e21045578f845593deb3c7fa42674c..47f364220255f800c3f40ee1ebd6087c045a400e 100644 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/overview.md +++ b/2019/2019-10-03_basicGitTraining-SIU/slides/overview.md @@ -1,15 +1,11 @@ # Overview -1. The terminal -2. The editor -3. What is `git`? What is the use of `git`? <!--(5 min)//--> -4. Installation of `git` -5. GitHub and GitLab <!--(5min)//--> -6. How do I configure `git`? <!--(5min)//--> -7. Where and how to start? <!--(5min)//--> -8. What is a fork? <!--(5min)//--> -9. What are branches? -10. The 5 essential commands (`pull` / `status` / `add` / `commit` / `push`) -11. What are merge/pull requests? <!--(10 min)//--> -12. How do I synchronize my fork? -13. Best practices \ No newline at end of file +1. What is `git`? What is the use of `git`? +2. GitHub and GitLab +3. The terminal +4. What is a fork? +5. What are branches? +6. The 5 essential commands (`pull` / `status` / `add` / `commit` / `push`) +7. What are merge/pull requests? +8. How do I synchronize my fork? +9. Best practices diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/syncFork.md b/2019/2019-10-03_basicGitTraining-SIU/slides/syncFork.md index a908869569972adac700f623ec73566b8af5d90c..ce26041e512e0e928043dce28de4b46de7f04fa5 100644 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/syncFork.md +++ b/2019/2019-10-03_basicGitTraining-SIU/slides/syncFork.md @@ -1,4 +1,4 @@ -# Synchronize your fork +# Synchronize your fork (i)  Remember, we have to regularly update our own copy of the code. @@ -25,6 +25,7 @@ $ git fetch upstream +# Synchronize your fork (ii) Merge the retrieved changes on the `master` branch: ```bash diff --git a/2019/2019-10-03_basicGitTraining-SIU/slides/the_terminal.md b/2019/2019-10-03_basicGitTraining-SIU/slides/the_terminal.md index da0446699032ccb62374f05b6af3ea9936a7d50d..e08327b5cacf4d17be4cc10aa756cd5e0e64db58 100644 --- a/2019/2019-10-03_basicGitTraining-SIU/slides/the_terminal.md +++ b/2019/2019-10-03_basicGitTraining-SIU/slides/the_terminal.md @@ -1,3 +1,14 @@ +# Note on Microsoft Azure Devops + +This course aims at the basics of using `git`. + +In order to understand the concepts of `git`, the terminal will be used instead of any GUI. +The same terminology applies. + +More info on Azure Devops & Git: https://docs.microsoft.com/en-us/azure/devops/repos/git/ + + + # First steps in the terminal Starting the terminal presents itself with a line where you can enter a command @@ -15,7 +26,7 @@ in your home directory (unless otherwise configured), denoted as `~/`. -# Essential Linux commands +# Essential Linux commands (i) List the contents of a directory ```bash @@ -43,6 +54,8 @@ $ cd ../.. +# Essential Linux commands (ii) + Move a file or a directory ```bash $ mv myFile.m myNewDirectory/.