Pedagogy: refresh tutorial/10.git.ipynb (drop 2.23 hedges; add restore, SSH, default-branch=main, --rebase-merges)
- Dominant language
- Jupyter Notebook
- Stars
- 12
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
## Why
`tutorial/10.git.ipynb` was authored when `git switch`/`git restore`
were experimental (git 2.23). 6+ years later they are stable, default
branch is `main` not `master`, and a few topic gaps have opened up
(SSH-key auth, `--rebase-merges`). The current intro also jumps
straight into "what is version control" without motivating the
beginner-relevant question — *how do I keep my work and not lose it?* —
that the tutorial actually answers.
Related:
- #14 — ReadMe.md cleanup notes "move SW install to `tutorial`"; this
issue is a step in that direction for the git portion.
- #387 — `.gitignore` tightening is the natural sibling for any
"keep your fork clean" subsection added here.
## Concrete edits
- [ ] **New beginner-framing intro paragraph** before the existing
version-control definition cell. Bilingual (English + Korean) to
match the rest of the notebook. Frames the three questions git
answers (save / recover / share).
- [ ] **Drop `(git >= 2.23)` qualifier ×4.** Four headings still hedge
`git switch` / `git switch -c`. Drop the qualifier; flip ordering so
`switch` / `restore` are primary and `checkout ` is shown as
legacy.
- [ ] **Add `git restore` subsection** alongside `git switch`:
- [ ] `git restore ` to discard an unstaged edit
- [ ] `git restore --staged ` to unstage
- [ ] **Default branch name = `main`.** One-liner near the existing
`git config` discussion; since git 2.28 (mid-2020), `git init -b main`
and `init.defaultBranch=main` are the convention.
- [ ] **Add SSH key authentication section** alongside the existing
PAT section:
- [ ] `ssh-keygen -t ed25519 -C "you@example.com"`
- [ ] add public key to GitHub → Settings → SSH keys
- [ ] verify with `ssh -T git@github.com`
- [ ] switch existing remotes via
`git remote set-url origin git@github.com:user/repo.git`
- [ ] brief contrast: SSH = once-per-machine; PAT = HTTPS bearer
(still needed for CI / locked-down environments). Both remain
valid.
- [ ] **Add `git rebase -i --rebase-merges` note.** Default interactive
rebase silently drops merge commits; `--rebase-merges` preserves them
— relevant for repos with upstream-merge / template-chain commits.
## No-touch list (stable, already correct)
`clone`, `add`, `commit`, `status`, `log`, `diff`, `remote`, `push`,
`pull`, `fetch`, `config`, `branch`, basic `rebase`, fork→sync workflow.
## Out of scope (future expansion candidates)
- `git maintenance` (2.30), `git sparse-checkout` (2.25), bundle URI
clone (2.38), `git rebase --update-refs` (2.38), `git subtree` (#61),
pre-commit hooks for ipynb output stripping (#78). Park for a future
intermediate tutorial.
## Open design calls (resolve during implementation)
- [ ] SSH section depth: quick-reference (5 commands, no troubleshooting)
or full walkthrough including `ssh-agent` setup and key-types
rationale (ed25519 vs RSA)?
- [ ] Order on the page: PAT-first (existing flow) or SSH-first?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.