Git practice: real situations from a team
You solve short Git problems from a team’s day without guidance; each task is a little harder than the last.
Level 201 · 15 lessons · 12 practice labs
Lessons
Everyday accidents
- You committed to the wrong branch
- Save work left on a detached HEAD
- Sort out a half-finished merge
- Find a lost stash
- Short task: fix three morning accidents in a row
Team problems
- Diverged local and remote branches
- Line-ending war: every file looks changed
- There is a password in a merge request
- The submodule comes up empty
- Short task: fix the repository a new developer broke
Release day
- A fix didn’t make it into the release
- A release tag on the wrong commit
- Which release has had the bug since
- Short task: ship an urgent patch release
Wrap-up
- Capstone: solve every Git problem from a bad week
Practice labs
- A commit on a teammate’s branch: Move the two unpushed commits you made on a teammate’s branch by mistake to your own branch and put their branch back as it was.
- Work done on top of a tag: Find the work of a developer who checked out a release tag, unknowingly committed on it and then switched away, attach it to a branch and merge it into main.
- A dropped stash and a half-done merge: Safely finish or undo a half-done merge, then find the stash that was dropped by mistake among dozens of dangling commits and bring the work back without loss.
- Diverged branches and the pull setting: Bring the diverged local and remote branch together with a rebase, set the pull behaviour permanently in the repository and show the next pull runs without a warning.
- Every file looks changed: Add .gitattributes rules to the repository where line-ending settings from different systems make every file look changed, renormalise it and show git status comes back clean.
- A password in an open merge request: Remove the password that got into the history of an unmerged branch from every commit, push the branch again safely and prove the password is in none of its commits.
- A tag on the wrong commit: Move the release tag nobody has used yet to the right commit, update it on the remote too and prove with ls-remote it points to the right commit.
- Which releases have the bug?: Find the commit that brought the bug with log -S, list every release tag that contains it and produce a table of affected and unaffected releases.
- A midnight patch release: Branch from the last release tag, carry the security fix over, bump and tag the version, and show the diff between the two tags contains only the fix.
- Scattered author identities: Add a .mailmap to the repository where the same people appear under different names and emails, and show each person collapses to a single line in shortlog.
- A committed dependency folder: Take the dependency folder with thousands of files out of your recent unpushed commits, add an ignore rule and show the repository size dropped.
- A change lost in a merge: Find a fix that silently disappeared during conflict resolution by comparing the merge commit with its parents, restore the fix and show the test passes.
About this course
You solve short Git problems from a team’s day without guidance; each task is a little harder than the last.
What you will learn
- Everyday accidents
- Team problems
- Release day
- Wrap-up
Prerequisites
Finishing the level 101 courses of the same path, or knowing those topics, is enough.
Lab environment
Lessons run in your own Kali Linux terminal that opens in the browser. Nothing to install; the lab starts clean in every lesson.
Frequently asked questions
- Is this course right for my level?
- The course is at level 201; it assumes you know the topics of the lower-level courses.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.