feat(curriculum): the GitHub module becomes step-by-step exercises - #410
Conversation
…efuses them Needed by the GitHub module as steps: a learner who commits before pulling a colleague's work ends up with diverged branches, and real git's way out is `git pull --no-rebase`. Outputs captured in git 2.56: the merge commit is "Merge branch 'main' of <url>", and --ff-only prints its hints then "fatal: Not possible to fast-forward, aborting." (exit 128). New lesson setup gitRepoPushed (main pushed and tracked, remote in sync); gitRepoBehindRemote builds on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s --no-edit, mv/cp say why a trailing slash fails - New-Item -ItemType Directory .github/workflows took "Directory" (the value of -ItemType) for the path; it now skips named parameter values and creates the parents, as PowerShell 7 does without -Force. - git pull --no-edit keeps git's merge message (no editor in this terminal); output checked against git 2.56 on diverged branches. - A destination ending in "/": GNU mv says "No such file or directory" when it is missing, cp says "Not a directory", and both say "failed to access '<dst>': Not a directory" when it is a file (coreutils 8.32). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The six exercises of github-collaboration asked for one command each. Each
is now a path checked on the repository state, with no dead end:
- git-remote: add origin, look with git remote -v, switch to SSH.
- git-push-pull (colleague pushed first): pull, add a page, commit, push;
pushing first ("fetch first") and committing before pulling (diverged)
each get advice, ending with git pull --no-rebase --no-edit.
- git-fetch-clone: fetch, git log HEAD..origin/main, merge origin/main.
- pull-requests: switch -c, commit, git push -u origin feature/contact.
- merge-strategies: merge --no-ff --no-edit, then branch -d; fast-forward,
--squash (staged or committed) and a reset --hard are handled.
- github-actions: move a real workflow into .github/workflows/, commit,
push (actions/checkout@v7, setup-node@v7, Node 24, checked 1 Oct 2026).
Theory replays from each lesson's setup: outputs checked against git 2.56
and PowerShell 7; the branched log --graph is shown as an illustration,
not replayed. New helpers onServer/branchContains/pushed, setup
gitRepoWithWorkflow; gitRepoWithRemote and six validators removed.
Theory gaps 120 -> 90.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Sorry @thierryvm, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 2 days and 19 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Guide du réviseurLa PR transforme le module GitHub & Collaboration en six exercices guidés, étape par étape et pilotés par l’état, reposant sur des configurations de dépôts réalistes et des conseils de récupération, tout en améliorant la fidélité du terminal pour les pulls divergents, la création de répertoires avec PowerShell et les erreurs de transfert de fichiers GNU ; la théorie du programme, les solutions, les tests et la documentation sont mis à jour en conséquence. Diagramme de séquence pour l’exercice de pull et pushsequenceDiagram
actor Learner
participant Terminal
participant Repository
participant Remote
Learner->>Terminal: git pull
Terminal->>Remote: Fetch colleague commit
Remote-->>Terminal: origin/main updated
Terminal->>Repository: Fast-forward main
Learner->>Terminal: git add contact.html
Learner->>Terminal: git commit -m feat: ajoute la page contact
Learner->>Terminal: git push
Terminal->>Remote: Update origin/main
Remote-->>Terminal: Push accepted
Diagramme de séquence pour la récupération après un pull Git divergentsequenceDiagram
actor Learner
participant Terminal
participant Repository
participant Remote
Learner->>Terminal: git push
Terminal->>Remote: Attempt update
Remote-->>Terminal: Rejected: fetch first
Learner->>Terminal: git pull
Terminal-->>Learner: Diverging branches advice
Learner->>Terminal: git pull --no-rebase --no-edit
Terminal->>Repository: Merge local and remote commits
Repository-->>Terminal: Merge commit created
Diagramme de flux pour les exercices GitHub pilotés par l’étatflowchart LR
Setup[Repository setup] --> Command[Learner enters command]
Command --> Engine[Terminal engine updates state]
Engine --> Check[Step checks repository state]
Check -->|Pass| Next[Unlock next step]
Check -->|Wrong turn| Advice[Recovery advice or restart]
Advice --> Command
Diagramme de flux pour l’exercice sur le workflow GitHub Actionsflowchart LR
Workflow[ci.yml at repository root] --> Directory[mkdir -p .github/workflows]
Directory --> Move[mv ci.yml .github/workflows/]
Move --> Stage[git add .github]
Stage --> Commit[git commit]
Commit --> Push[git push]
Push --> Actions[GitHub Actions runs workflow]
Modifications au niveau des fichiers
Conseils et commandesInteragir avec Sourcery
Personnaliser votre expérienceAccédez à votre tableau de bord pour :
Obtenir de l’aide
Original review guide in EnglishReviewer's GuideThe PR transforms the GitHub & Collaboration module into six state-driven, step-by-step exercises backed by realistic repository setups and recovery advice, while extending terminal fidelity for divergent pulls, PowerShell directory creation, and GNU file-transfer errors; curriculum theory, solutions, tests, and documentation are updated accordingly. Sequence diagram for the pull-and-push exercisesequenceDiagram
actor Learner
participant Terminal
participant Repository
participant Remote
Learner->>Terminal: git pull
Terminal->>Remote: Fetch colleague commit
Remote-->>Terminal: origin/main updated
Terminal->>Repository: Fast-forward main
Learner->>Terminal: git add contact.html
Learner->>Terminal: git commit -m feat: ajoute la page contact
Learner->>Terminal: git push
Terminal->>Remote: Update origin/main
Remote-->>Terminal: Push accepted
Sequence diagram for divergent git pull recoverysequenceDiagram
actor Learner
participant Terminal
participant Repository
participant Remote
Learner->>Terminal: git push
Terminal->>Remote: Attempt update
Remote-->>Terminal: Rejected: fetch first
Learner->>Terminal: git pull
Terminal-->>Learner: Diverging branches advice
Learner->>Terminal: git pull --no-rebase --no-edit
Terminal->>Repository: Merge local and remote commits
Repository-->>Terminal: Merge commit created
Flow diagram for state-driven GitHub exercisesflowchart LR
Setup[Repository setup] --> Command[Learner enters command]
Command --> Engine[Terminal engine updates state]
Engine --> Check[Step checks repository state]
Check -->|Pass| Next[Unlock next step]
Check -->|Wrong turn| Advice[Recovery advice or restart]
Advice --> Command
Flow diagram for the GitHub Actions workflow exerciseflowchart LR
Workflow[ci.yml at repository root] --> Directory[mkdir -p .github/workflows]
Directory --> Move[mv ci.yml .github/workflows/]
Move --> Stage[git add .github]
Stage --> Commit[git commit]
Commit --> Push[git push]
Push --> Actions[GitHub Actions runs workflow]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary
The six exercises of the GitHub & Collaboration module asked for a single command each (one of them ended on
git statusand "GitHub Actions will do the rest"). Each is now a multi-step exercise checked on the repository state, with no dead end when commands are typed out of order.remote add origin→remote -v→set-urlto SSHpull(a colleague pushed first) → page →add→commit→pushgitRepoBehindRemotefetch→log HEAD..origin/main→merge origin/maingitRepoBehindRemoteswitch -c feature/contact→ page →add→commit→push -ugitRepoPushedmerge --no-ff --no-edit→branch -dfeature/ma-featuremkdir -p .github/workflows(Windows:New-Item) →mv→add→commit→pushgitRepoWithWorkflowLearners who take a wrong turn get advice:
git pull --no-rebase --no-edit(--no-editbecause a real terminal would open an editor).--squashmerge is detected, both when staged and when committed.git reset --hardafter the merge restarts the exercise.-uis detected.mainis detected.mvbefore its folder exists is detected.Theory
git log --graphis shown as an illustration and is not replayed, because it is not simulated.actions/checkout@v7,actions/setup-node@v7, Node 24.Engine (separate commit)
New-Item -ItemType Directory <path>tookDirectoryfor the path. It now creates the folder and its parents, as PowerShell 7 does.git pull --no-editis accepted.mvorcpends in/, the error now gives GNU's wording.Removed: six regex validators and the
gitRepoWithRemotesetup, which no lesson uses any more.Gates
curriculum-validator, run before the change: 0 CRITICAL.test-runner: type-check, lint, vitest and build all green.terminal-fidelity-auditor: 0 THEORY-WRONG and 38 MATCH. Findings:mvmessage was wrong; it is fixed here.Get-ChildItem/Move-Itemerror texts are left for the Windows fidelity PR.feature-dev:code-reviewermade one IMPORTANT finding: the--squashpath had no advice.merge --no-ffstill creates the merge commit.Test plan
🤖 Generated with Claude Code
Résumé par Sourcery
Convertir le module GitHub & Collaboration en six exercices progressifs, sensibles à l’état, avec un comportement Git réaliste, des conseils pour les erreurs courantes et une fidélité améliorée du terminal.
Nouvelles fonctionnalités :
Corrections de bugs :
--no-edit, la création de répertoires avecNew-Itemet les erreurs demv/cpavec une barre oblique finale.Améliorations :
Documentation :
Tests :
Tâches de maintenance :
Original summary in English
Summary by Sourcery
Convert the GitHub & Collaboration module into six state-aware, step-by-step exercises with realistic Git behavior, guidance for common mistakes, and updated terminal fidelity.
New Features:
Bug Fixes:
--no-edit,New-Itemdirectory creation, and trailing-slashmv/cperrors.Enhancements:
Documentation:
Tests:
Chores: