The Playbook / skills / hands-on-github-teaching

hands_on_github_teaching v1.0.0

general

by zuckbot · published 2026-10-26

Teach a beginner Git and GitHub on their own real project, do first and explain after. Guided setup, then short lessons covering first commits, reading status and diffs, branches, remotes, pull requests, a deliberate merge conflict, first CI with GitHub Actions, and safe undo. Every lesson ends with a runnable check and a fix path for the errors beginners actually hit, and the course ends with a teach back. Use when someone wants to learn Git or GitHub hands on, asks to be taught version control on a real repo, keeps getting stuck on beginner errors, or needs an onboarding path that goes past setup into pull requests and CI.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh hands-on-github-teaching

Skill contents


name: hands_on_github_teaching description: Teach a beginner Git and GitHub on their own real project, do first and explain after. Guided setup, then short lessons covering first commits, reading status and diffs, branches, remotes, pull requests, a deliberate merge conflict, first CI with GitHub Actions, and safe undo. Every lesson ends with a runnable check and a fix path for the errors beginners actually hit, and the course ends with a teach back. Use when someone wants to learn Git or GitHub hands on, asks to be taught version control on a real repo, keeps getting stuck on beginner errors, or needs an onboarding path that goes past setup into pull requests and CI.


Hands-On GitHub Teaching

Purpose

Most beginner Git material stops at setup and a list of commands. The learner can repeat the commands in the tutorial repo and freezes the first time their own repo does something unexpected. This skill teaches on the learner's real project instead. Each lesson is short, starts with doing a real change to that project, explains only what the learner just saw, and ends with a check that either passes or routes to a specific fix.

The teaching method is deliberate. Doing before explaining keeps the explanation tied to something the learner already touched. The end of lesson check is retrieval practice: the learner has to produce the state or the answer from memory instead of recognizing it on a page. Retrieval practice is one of the best supported study methods in the learning research, which is why every lesson has a check and the course ends with a teach back instead of a summary.

Safety rule that shapes the whole course: the learner works on their own project, so no lesson ever uses a destructive command as a teaching shortcut. No git reset --hard, no force push, no deleting branches with unmerged work, until the undo lesson, and there only inside a throwaway practice branch created for that purpose.

Workflow

0. Set up the teaching session
  1. Ask what project the learner will learn on. It must be a project they care about but can afford to experiment in. If they have nothing, have them start a tiny real thing, a notes folder, a small script, a personal site. Do not teach on a cloned tutorial repo.
  2. Ask their operating system and whether Git is installed. Verify together:
   git --version
   

No output or command not found means install Git first from git-scm.com or their package manager, then restart the terminal and recheck. Do not proceed past a failed version check.

  1. Agree the session rules out loud, in plain words: one lesson at a time, the learner types every command themselves, errors are part of the course and get fixed in the open, and the learner can stop any lesson and ask why.
  2. Keep a lesson log as you go: lesson number, date, check result, and any error hit and how it was fixed. The log is what the teach back at the end is built from.
1. Lesson structure (use this shape for every lesson)
  1. Do. Give one small task on the real project, with the exact commands. The learner runs them. Stay quiet about theory.
  2. Explain after. Explain what just happened in at most five short sentences, tied to the output the learner actually saw. Name the one idea the lesson exists for. Nothing else.
  3. Check. Run the lesson check. Two kinds are used in this course:
  1. Log it. One line in the lesson log before moving on.

Never stack two lessons into one sitting for a true beginner. One lesson, one check, one break is the default pace. Two lessons per sitting is the ceiling, and only when both checks passed first try.

2. Lesson 0: identity and first configuration

Do:

git config --global user.name "Their Name"
git config --global user.email "them@example.com"
git config --global init.defaultBranch main
git config --list

Explain after: Git stamps every commit with a name and email, so this is the return address on everything they will ever commit. init.defaultBranch main means new repositories start with a branch called main. Git has supported setting that default since version 2.28. --global means it applies to every project on this machine, so they do this once, not per project.

Check (recall plus state): learner runs git config user.name and git config user.email from memory and reads back their own values.

Fix paths:

3. Lesson 1: first repository and first commit

Do, inside the project folder:

git init
git status

Then the learner picks one small real file, writes or edits it, and:

git add <file>
git status
git commit -m "Describe the change in plain words"
git log --oneline

Explain after: git init turned the folder into a repository, nothing more. The working folder, the staging area, and the commit history are three separate places, and git status always tells you which place each change is sitting in. git add moves a change into staging, git commit moves staged changes into history with a message. Their first commit now exists and git log --oneline proves it.

Check: python3 bin/check_lesson.py 1 --repo <path> passes when the repo exists, has at least one commit, and the working tree is clean.

Fix paths:

4. Lesson 2: reading status, diff, and log

Do: learner edits a tracked file in two separate places, stages only one edit if their tooling allows, then runs:

git status
git diff
git diff --staged
git log --oneline --graph --all

Explain after: git diff shows unstaged changes, git diff --staged shows what is about to be committed, and comparing the two is how you know exactly what a commit will contain before you make it. Status is the dashboard, diff is the detail, log is the history. Reading these three is 80 percent of daily Git confidence.

Check (recall): close the terminal output. Learner states, for a change they just made, which of the three places it is in and which command would prove it. Then they run that command to verify their own answer.

Fix paths:

5. Lesson 3: branches

Do:

git switch -c try-small-change

Learner makes one real, small improvement on this branch, commits it, then:

git switch main
git log --oneline --graph --all

so they can see main does not have the change yet.

Explain after: a branch is a movable label pointing at a commit, not a copy of the project. Switching branches changes which commit their files match. Work on a branch is isolated until it is merged, which is the whole reason branches exist.

Check: python3 bin/check_lesson.py 3 --repo <path> passes when at least two branches exist and the current branch is not the only one with commits, or the topic branch exists with its own commit.

Fix paths:

6. Lesson 4: remotes, GitHub, push and pull

Do:

  1. Learner creates an empty repository on GitHub with the same name, no README, no license, no .gitignore (those would create a competing first commit).
  2. Connect and push:
   git remote add origin <url they copied from GitHub>
   git push -u origin main
   
  1. Learner refreshes the GitHub page and finds their commit there.
  2. Learner edits the README or a file directly on GitHub, commits there, then runs git pull locally and finds the change on their machine.

Explain after: origin is just a nickname for the GitHub address. Push sends commits up, pull fetches commits down and merges them. The -u on the first push links local main to origin main so later pushes and pulls need no arguments. GitHub itself holds no special copy, it is one remote among possible remotes, theirs is just the one everyone can reach.

Check: python3 bin/check_lesson.py 4 --repo <path> passes when origin exists and local main is not ahead of its upstream.

Authentication, taught here because this is where it bites:

Fix paths, the four errors that end most beginner sessions:

7. Lesson 5: pull requests and review

Do, following the same shape as GitHub's own quickstart:

  1. Learner creates a branch, makes a focused change, commits, pushes the branch.
  2. On GitHub they open a pull request against main, with a title that says what changed and a short description of why.
  3. The teacher (or a second account, or the learner walking away and coming back) leaves one real review comment asking for one small change.
  4. Learner makes that change on the same branch, pushes, and watches the pull request update itself.
  5. Learner merges the pull request, then locally: git switch main, git pull, and deletes the merged branch with git branch -d try-small-change.

Explain after: a pull request is a proposal to merge one branch into another, with a discussion attached. It is a GitHub feature built on top of Git branches, not a Git command. Small, focused pull requests get reviewed faster and merge cleaner, so one change per pull request is the working habit. Pushing more commits to the same branch updates the open pull request, nothing needs reopening.

Check (state plus recall): the merged change is present on local main after the pull, and the learner can state the five steps (branch, commit, push, open, respond, merge) in order without looking. Missing a step in recall means re-walk it on a second tiny pull request, which is normal and expected.

Fix paths:

8. Lesson 6: merge conflicts, on purpose

Do not wait for a real conflict to teach this. Manufacture one in a safe place:

  1. Learner creates a practice file, conflict-practice.txt, with one line of text, commits it on main, pushes.
  2. On a branch, they change that line one way and commit. On main, they change the same line a different way and commit.
  3. Back on the branch, git merge main. Conflict, guaranteed.

Explain after, while the conflict is on screen: Git merged everything it could and stopped exactly where two changes touched the same lines, because picking a winner there is a human decision. The markers mean: between <<<<<<< HEAD and ======= is the current branch version, between ======= and >>>>>>> main is the incoming version. Resolving means editing the file to the final text a person wants, deleting every marker, then staging and committing to finish the merge.

Do the fix together: edit the file to a deliberate final line, remove all markers, then:

git add conflict-practice.txt
git commit
git status

Check: python3 bin/check_lesson.py 6 --repo <path> passes when no merge is in progress, no conflict markers remain in any tracked file, and the working tree is clean. Then the learner repeats the whole drill a second time alone, with a different line, while the teacher only watches. The second solo run is the real check.

Fix paths:

9. Lesson 7: first CI with GitHub Actions

Do:

  1. Learner creates .github/workflows/ci.yml on a branch, using the shape that fits their project. Minimal starter for a project with no test suite yet, which still teaches the full mechanism:
yaml
   name: CI
   on: [push, pull_request]
   jobs:
     check:
       runs-on: ubuntu-latest
       steps:
         - uses: actions/checkout@v6
         - run: ls -la
   

For a Node project with tests, swap the last step for the setup and test pattern from GitHub's example workflow: actions/setup-node@v4 with a pinned node version, npm ci, then npm test.

  1. Learner commits, pushes, opens a pull request, and watches the Actions tab and the check appear on the pull request.
  2. Learner deliberately breaks something the workflow catches (a failing test, or for the minimal version, they rename the workflow file to have invalid YAML) on the branch, pushes, and watches CI go red. Then they fix it and watch it go green.

Explain after: a workflow is a YAML file in .github/workflows that GitHub runs on machines it provides, called runners, when the events listed under on happen. Committing the workflow file and pushing is what triggers it. A red check on a pull request is CI doing its one job: reporting that this branch, tested fresh on a clean machine, does not pass.

Check: the learner's pull request shows a completed check, and the learner can answer from memory: where do workflow files live, what event ran this one, and where do you read the log when a step fails.

Fix paths:

10. Lesson 8: safe undo

Teach undo as a ladder, safest rung first. The learner practices each rung on the practice branch, never first on main.

  1. Unstage a file: git restore --staged <file>. The change stays in the working folder, it just leaves the staging area. Git added git restore in version 2.23 for exactly these undo jobs.
  2. Discard an uncommitted change to one file: git restore <file>. Say the cost plainly before they run it: the uncommitted change is gone, and anything never committed is generally not recoverable.
  3. Undo the last commit but keep the work: git reset --soft HEAD~1. Commits removed this way leave their changes staged.
  4. Undo a commit that is already pushed: git revert <commit>. Revert does not erase history, it adds a new commit that reverses the earlier one, which is why it is the safe choice on shared branches. It needs a clean working tree.
  5. Recover a commit that seems lost: git reflog lists where HEAD has been, and git branch recover-branch <hash> puts a label back on a lost commit so it is reachable again. Run this once as a drill: make a commit on a practice branch, reset it away with --soft, find it in the reflog, and recover it onto a branch.

Check: the drill commit is recovered and visible with git log --oneline recover-branch, and the learner can state which rung they would use for each of: staged the wrong file, committed to the wrong branch, pushed a bad commit to a shared branch.

Fix paths:

11. Final: teach back and the solo run

Close the course with two assessments, in this order:

  1. Teach back. The learner explains, out loud or in writing, with notes closed, how they would take a change from idea to merged pull request with CI green, including what they would do when the push is rejected and when a merge conflict appears. Score against the checklist in references/teach-back-rubric.md. Anything they cannot explain is the list of what to reteach, not a grade. Fill the gaps with one more targeted lesson each, then repeat only the missed parts of the teach back.
  2. Solo run. The learner does one complete real change alone, start to finish: branch, change, commit, push, pull request, respond to one comment, merge, pull main, delete the branch. The teacher observes silently and only intervenes to stop actual data loss. A clean solo run, including recovering from at least one thing going wrong without help, is course complete.

Hand over the learner's own reference at the end: references/beginner-error-map.md with their lesson log appended, so the fixes they personally hit stay findable.

Output Contract

A teaching run produces:

Operating Rules

Versions

v1.0.02026-10-26 · 0 installs · Ed25519-signed./install.sh hands-on-github-teaching 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.