Add lesson 1: Why version control
3 changed files with 30 additions and 0 deletions
lessons/01-why-version-control/README.md ADDED
| @@ -0,0 +1,19 @@ | ||
| 1 | +# Lesson 1: Why version control | |
| 2 | + | |
| 3 | +We look at why version control the way working developers use it, with examples you can change and run right away. | |
| 4 | + | |
| 5 | +Full lesson: [https://glibcode.net/courses/git-github/lessons/1](https://glibcode.net/courses/git-github/lessons/1) | |
| 6 | + | |
| 7 | +## Files | |
| 8 | + | |
| 9 | +- `commands.sh`: checking your setup before the first repository | |
| 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/01-why-version-control/commands.sh ADDED
| @@ -0,0 +1,6 @@ | ||
| 1 | +# Who are you? Git writes this into every commit. | |
| 2 | +git config --global user.name "Your Name" | |
| 3 | +# Use the no-reply address from your profile settings, not your private mail | |
| 4 | +git config --global user.email "you@noreply.example.org" | |
| 5 | +git config --global init.defaultBranch main | |
| 6 | +git --version | |
lessons/01-why-version-control/exercises.md ADDED
| @@ -0,0 +1,5 @@ | ||
| 1 | +# Exercises: lesson 1 | |
| 2 | + | |
| 3 | +1. Combine this lesson with the previous one: use something from both in a small program of your own. | |
| 4 | +2. Find one thing in `commands.sh` you could name better and rename it everywhere. | |
| 5 | +3. Rewrite the main part so it runs twice with two different inputs, without copying the code. | |