Per-Arne's Git Good!
Git crash course: from zero to hero — From your first commit to confident teamwork — watch it happen in real Git, try it yourself, understand why.
6 modules · 25 lessons · ~5.3 h
- 1 · Understand — Short narrated explanation with animated figures of the history.
- 2 · Watch — A demo in real Git plays step by step. Predict before each key command.
- 3 · Your turn — Do the same yourself. The course checks the result in Git, not the wording. Hints when needed.
- 4 · Transfer — A new variant without a demo, and questions that make you recall it again.
Learning outcomes
After the course you can:
- Explain why Git is distributed, and Git's data model: a commit is a snapshot with parents and an ID derived from its content, while branches, tags and HEAD are pointers to commits. understand
- Build a clean history: control what goes into each commit through the working tree and the staging area, give each commit one purpose and a message that says why, and keep unwanted files and unfinished work out. apply
- Branch and merge: create and switch branches, predict whether a merge becomes a fast-forward or a merge commit, and resolve or abort a conflict. apply
- Collaborate through a remote: tell apart your branch, its remote-tracking branch and the branch in the remote, keep them in step with fetch, pull and push, and publish a feature branch for review. apply
- Investigate history: read the graph, compare revisions and trace a line or a bug to the commit that introduced it, with log, diff, blame and bisect. analyse
- Choose and justify an integration strategy (fast-forward, merge commit, rebase, squash or cherry-pick) from whether the history is shared, and tidy private history with interactive rebase before sharing it. evaluate
- Choose and justify an undo tool from where the change lives: restore for files, reset for local history and revert for shared history. evaluate
- Recover from mistakes without losing work or overwriting others' work: abort an operation in progress, find commits that look lost with the reflog and ORIG_HEAD, and resolve a rejected push without force. apply
Module 1: Foundations
Why Git, snapshots, the three areas and a history you can read.
- Why Git? Git, GitHub and distributed version control · 10 min — explain the difference between Git, the program that creates and stores the history, and hosting services such as GitHub, GitLab and Bitbucket
- What is Git? Snapshots and your first commit · 10 min — explain what a commit is, and how parent links connect commits into history
- Three areas: working tree, staging area and HEAD · 11 min — explain where a file version lives, in the working tree, the staging area or HEAD, and predict which version ends up in the next commit
- Good commits: small, intentional and well described · 12 min — split mixed changes into commits with one purpose each, also inside one file with
git add -p - Reading history: log, show and the objects behind them · 11 min — use
git logwith--oneline,--statand-- <file>to find the commit that changed a specific file
Module 2: Branching and merging
Pointers, parallel lines of work and conflicts without panic.
- Branches and HEAD: pointers, not copies · 12 min — explain that a branch is a movable pointer to one commit, not a copy of the files
- Fast-forward: when merge only moves a pointer · 10 min — predict from the graph when a merge will be a fast-forward
- Three-way merge: when both lines have moved · 12 min — explain what a merge base is, and find it with
git merge-base - Conflicts without panic · 14 min — explain why Git stops with a conflict when the same lines changed differently on both sides
- Tags: fixed names for important versions · 10 min — mark a release with
git tag -a v1.0 -mand inspect it withgit show
Module 3: Collaboration
Remotes, fetch, pull and push — and how a team works safely together.
- Remotes and clone: three things called main · 10 min — explain that a remote is just another repository, and that
originis only a local name for its address - Fetch, pull and push: keeping in step with the team · 12 min — explain why your origin/main does not move when a colleague pushes, until you run
git fetch - Team workflow: feature branches, pull requests and agreements · 12 min — create a feature branch, publish it with
git push -u, and explain why that does not change main
Module 4: Undo and rewrite
Pick the right undo tool, tidy private history and rescue work that looks lost.
- Undo in your files: git restore · 11 min — discard an unstaged edit with
git restore, and explain why Git cannot bring back an edit it never stored - Move the branch back: git reset · 12 min — undo local commits by moving the branch with
git reset, choosing the mode (--soft,--mixed,--hard) from what should happen to staging and the working files - Undo shared history: git revert · 11 min — undo a pushed commit with
git revertand share the fix without force-pushing - Rebase: replay your work on a new base · 13 min — explain why
git rebaseproduces new commits with new IDs, and what happens to the originals - Interactive rebase: tidy up before you share · 13 min — read the plan from
git rebase -iand explain why the oldest commit is at the top - Reflog: rescue work that looks lost · 13 min — explain what the reflog records, and why commits that look lost usually still exist
Module 5: The toolbox
Stash, cherry-pick, debugging through history and a safe workflow.
- Stash: set unfinished work aside · 12 min — set unfinished changes aside with
git stash push -mand bring them back withgit stash pop - Cherry-pick: copy one commit · 12 min — copy the change from one specific commit onto another branch with
git cherry-pick - Bug hunting: log -S, blame and bisect · 14 min — find the commit that introduced a bug with
git bisectand a test, and end the search withgit bisect reset - Worktrees and bigger projects · 13 min — work on two branches at once with
git worktree add, and clean up afterwards withgit worktree removeorgit worktree prune - A safe workflow from start to finish · 15 min — carry out a whole day in a team: update
main, work on a branch, read the diff, commit and push
Module 6: Final challenge
From solo to team: show that you master the whole workflow in real Git, without a demo.
- Final challenge: from solo to team · 35 min — carry out the whole path from feature branch to published main in real Git, without a demo
Install Git · Command reference · Glossary · About the course
Per-Arne's Git Good!