This app's Git history so far
Recent commits, from this app
$ git --version
git version 2.43.0
$ git log --oneline --no-merges -6
61b443d4 Add pt-BR connectors for Array#to_sentence
1ae6550d Finish style pass: Solid Cache: database caching
5de07ca0 Style and facts: Solid Cache: database caching, lessons 1-7
d4b6634e Finish style pass: Mailers: templates & async
0c106c1e Style and facts: Mailers: templates & async, lessons 1-7
95c1f622 Finish style pass: ActiveSupport: extensions & time
Both commands ran against this project when this course was revised. These six commits are the work itself: lesson rewrites and one small app fix. What --no-merges hides is how they reached main. Each arrived through a pull request, and main records that with a merge commit ("Merge pull request #266 ...") whose second parent is the branch's last commit. git rev-list --count --merges main counts 174 such merge commits among the 4,092 commits on main. So this repo combines branches by merging, keeping each branch's fork visible in the history. Rebasing is the other way to combine them, and this course shows what it does differently.
A second fact, from the same repo
$ git branch -a
backup-before-reword
+ content/style-pass-junior-71
+ content/style-pass-junior-72
dependabot/bundler/rspec-rails-8.0.4
* main
revert-41-dependabot/bundler/pagy-43.3.2
roadmap/phase-1-security
vanilla-bookmarks-slice
remotes/origin/HEAD -> origin/main
remotes/origin/dependabot/bundler/rails-8.1.4
remotes/origin/main
This also ran against this project, trimmed to the rows worth pointing at. main, marked with *, is the checked-out branch. Lines marked + are branches checked out in another worktree: this style pass works in one worktree per course, each on a content/style-pass-junior-N branch based on the one before it, a stack of branches. git branch --merged main shows that roadmap/phase-1-security, revert-41-dependabot/bundler/pagy-43.3.2 and dependabot/bundler/rspec-rails-8.0.4 are already reachable from main. Two branches aren't: git log main..backup-before-reword --oneline lists two commits that main doesn't have, and the same command lists one for vanilla-bookmarks-slice. Branches like these are what rebase and merge exist to resolve eventually, and this course keeps coming back to this repo instead of a made-up one.
What "Git merging & conflicts" already covered
That earlier course covered fast-forward and three-way merges, reading and resolving <<<<<<< conflict markers, and git merge --abort. It introduced git rebase <branch> as a second way to combine branches, where commits are replayed instead of merged and get new hashes. It gave the golden rule: never rebase commits that are already pushed somewhere shared. And it took a first, table-driven look at git rebase -i: pick, reword, squash, fixup, drop.
This course assumes all of that. It doesn't re-teach the golden rule or the pick/squash/fixup table; it builds on them.
What this course covers
Lesson 2 runs a rebase that hits a conflict, resolved step by step, with a surprise about a commit whose resolution leaves it with nothing to contribute. Lesson 3 covers git commit --fixup with git rebase --autosquash, the piece of interactive rebase's cleanup that can run without an editor. Lesson 4 covers git rebase --onto, for moving a branch to a different base. Lesson 5 covers git stash, a separate stack from commits that this series has so far used in one four-line aside. Lesson 6 covers the difference between git stash apply and git stash pop, which people often mix up. Lesson 7 shows what happens, conflict markers included, when a git stash pop can't apply cleanly.
How the demos were run
Lessons 2, 3, 5, 6 and 7 run their commands in a disposable scratch repository, never in this app's own, so the terminal output quoted is real. Git's behavior depends on its version, and this course says so where it matters: this machine runs Git 2.43.0, and lesson 3 uses a feature that changed in Git 2.44. Lesson 4 uses examples from Git's own manual.
Keep going with lesson 2
Rebase replays one commit at a time, shown with a conflict
A rebase stops on a conflict, is resolved step by step, and silently drops a commit whose diff empties.
A free account also gives you the quizzes, your progress and notes, and the discussion.