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:
Concrete edits
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)
Open design calls (resolve during implementation)
Why
tutorial/10.git.ipynbwas authored whengit switch/git restorewere experimental (git 2.23). 6+ years later they are stable, default
branch is
mainnotmaster, and a few topic gaps have opened up(SSH-key auth,
--rebase-merges). The current intro also jumpsstraight 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:
tutorial"; thisissue is a step in that direction for the git portion.
.gitignoretightening is the natural sibling for any"keep your fork clean" subsection added here.
Concrete edits
version-control definition cell. Bilingual (English + Korean) to
match the rest of the notebook. Frames the three questions git
answers (save / recover / share).
(git >= 2.23)qualifier ×4. Four headings still hedgegit switch/git switch -c. Drop the qualifier; flip ordering soswitch/restoreare primary andcheckout <branch>is shown aslegacy.
git restoresubsection alongsidegit switch:git restore <file>to discard an unstaged editgit restore --staged <file>to unstagemain. One-liner near the existinggit configdiscussion; since git 2.28 (mid-2020),git init -b mainand
init.defaultBranch=mainare the convention.PAT section:
ssh-keygen -t ed25519 -C "you@example.com"ssh -T git@github.comgit remote set-url origin git@github.com:user/repo.git(still needed for CI / locked-down environments). Both remain
valid.
git rebase -i --rebase-mergesnote. Default interactiverebase silently drops merge commits;
--rebase-mergespreserves 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, basicrebase, fork→sync workflow.Out of scope (future expansion candidates)
git maintenance(2.30),git sparse-checkout(2.25), bundle URIclone (2.38),
git rebase --update-refs(2.38),git subtree(Couldgit subtreepromote bureaucracy? #61),pre-commit hooks for ipynb output stripping (git hook code formatting #78). Park for a future
intermediate tutorial.
Open design calls (resolve during implementation)
or full walkthrough including
ssh-agentsetup and key-typesrationale (ed25519 vs RSA)?