Add lesson 6: Pull requests and reviews
3 changed files with 30 additions and 0 deletions
lessons/06-pull-requests-and-reviews/README.md ADDED
| @@ -0,0 +1,19 @@ | ||
| 1 | +# Lesson 6: Pull requests and reviews | |
| 2 | + | |
| 3 | +This lesson covers pull requests and reviews. You'll read a short explanation, try three small exercises and finish with a quiz. | |
| 4 | + | |
| 5 | +Full lesson: [https://glibcode.net/courses/git-github/lessons/6](https://glibcode.net/courses/git-github/lessons/6) | |
| 6 | + | |
| 7 | +## Files | |
| 8 | + | |
| 9 | +- `commands.sh`: a feature branch ready for review | |
| 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/06-pull-requests-and-reviews/commands.sh ADDED
| @@ -0,0 +1,6 @@ | ||
| 1 | +git switch -c fix/typo-in-readme | |
| 2 | +git commit -am "Fix typo in README" | |
| 3 | +git push -u origin fix/typo-in-readme | |
| 4 | +# open the pull request in the web interface, ask a classmate to review | |
| 5 | +git switch main && git pull | |
| 6 | +git branch -d fix/typo-in-readme | |
lessons/06-pull-requests-and-reviews/exercises.md ADDED
| @@ -0,0 +1,5 @@ | ||
| 1 | +# Exercises: lesson 6 | |
| 2 | + | |
| 3 | +1. Make the example ask for its input instead of using a fixed value. | |
| 4 | +2. Add a comment above each block explaining what it does, in your own words. | |
| 5 | +3. Run `commands.sh` and change one value. Write down what you expect, then run it again and compare. | |