Add lesson 5: Remotes and GitHub
3 changed files with 30 additions and 0 deletions
lessons/05-remotes-and-github/README.md ADDED
| @@ -0,0 +1,19 @@ | ||
| 1 | +# Lesson 5: Remotes and GitHub | |
| 2 | + | |
| 3 | +In this lesson you'll work through remotes and GitHub step by step, with short exercises after each idea. | |
| 4 | + | |
| 5 | +Full lesson: [https://glibcode.net/courses/git-github/lessons/5](https://glibcode.net/courses/git-github/lessons/5) | |
| 6 | + | |
| 7 | +## Files | |
| 8 | + | |
| 9 | +- `commands.sh`: remotes: clone, push and pull | |
| 10 | + | |
| 11 | +## Run it | |
| 12 | + | |
| 13 | +```sh | |
| 14 | +# type the commands from commands.sh one by one; don't run it as a script | |
| 15 | +``` | |
| 16 | + | |
| 17 | +## Exercises | |
| 18 | + | |
| 19 | +See [exercises.md](exercises.md). Ask in the forum once you've tried. | |
lessons/05-remotes-and-github/commands.sh ADDED
| @@ -0,0 +1,6 @@ | ||
| 1 | +git clone https://git.glibcode.net/glibcode/git-github.git | |
| 2 | +cd git-github | |
| 3 | +git remote -v | |
| 4 | +git switch -c my-notes | |
| 5 | +git push -u origin my-notes | |
| 6 | +git pull --rebase | |
lessons/05-remotes-and-github/exercises.md ADDED
| @@ -0,0 +1,5 @@ | ||
| 1 | +# Exercises: lesson 5 | |
| 2 | + | |
| 3 | +1. Make the example ask for its input instead of using a fixed value. | |
| 4 | +2. Rewrite the main part so it runs twice with two different inputs, without copying the code. | |
| 5 | +3. What happens with an empty input? Change the code so it handles that case with a clear message. | |