Developer Foundations line, station 2 of 9
Git from the Inside
Understand how Git really works, from snapshots and the staging area to branches, conflicts, safe history rewriting, undo and the objects inside .git, by running every command yourself.
- 7lessons
- 4.5 hto read and do
- Beginnerlevel
- 7podcast episodes
- 9checked exercises
- 4simulators
Tools you'll use in this course
The lessons open these with a template ready. They work for your own job too, no course needed.
About this course
Most people learn Git as a list of commands to copy, and panic when one of them prints something unexpected. This course gives you the mental model instead. You start with what a commit really is (a snapshot, not a list of edits) and the three areas every command moves files between, then build the everyday habits: reading diffs, staging part of a file, writing Conventional Commit messages and searching history with log, the pickaxe and blame.
From there you branch and merge while watching the pointers move, resolve conflicts by intent rather than by clicking a button, tidy a messy branch with interactive rebase and push it safely with --force-with-lease, cherry-pick a hotfix onto a release branch, and recover from almost any mistake with restore, reset, revert and the reflog. The last lesson opens the .git folder itself, so you can walk from HEAD to a file's bytes and compute a blob ID by hand.
Every lesson is set at Mangrove Market, a fictional grocery chain with about 320 stores, a Store app on handheld scanners and a Partner app used by 1,800 corner shops, where you play a new team member. Each lesson has diagrams, quick checks, a Build-it section with real Git 2.55 commands and real outputs, simulators for the trickiest ideas, practice tasks auto-checked in your browser, flashcards and a podcast episode. The course ends with a capstone project and a final exam for a free certificate.
What you will be able to do
- Explain what a commit, a branch and HEAD really are, and predict what any Git command will move between the working folder, the staging area and the repository
- Make small, well-described commits with the staging area, git add -p and Conventional Commit messages, and keep secrets out with .gitignore
- Search history to find when and why a line changed, with git log, the pickaxe and blame
- Branch, merge and resolve conflicts by combining both sides' intentions, then prove the result with tests
- Tidy a branch with interactive rebase, push it safely with --force-with-lease, cherry-pick a hotfix and stash work in progress
- Recover from almost any mistake with restore, reset, revert and the reflog, and know which undo is safe after pushing
Syllabus
7 stops, about 4.5 h in total. Each stop fills in when you complete the lesson.
What Git really is: snapshots and the three areas
Most Git confusion comes from one wrong picture: that Git stores a list of edits. It stores snapshots, and every command moves files between three places on your laptop. Once you see those three places, git status becomes a dashboard you can read at a glance, and the rest of Git starts to make sense.
Git fundamentalsStaging and committingReading history
Everyday Git: status, diff, log and good commits
Most of a developer's Git day is four questions: what did I change, what am I about to commit, what happened before, and who changed this and why. This lesson gives you the commands that answer each one, and the habits that make the answers useful months later.
Reading historyCommit hygieneStaging and committing
Branches and merging
A branch lets you work on one change without disturbing anyone else, and merging brings that work back. Once you see that a branch is only a movable label on a commit, every branch and merge command becomes predictable. This lesson builds that picture and then uses it.
Branching and mergingGit fundamentalsReading history
Merge conflicts without panic
A merge conflict is Git saying "two people changed the same lines, and I will not guess which one is right". It is normal, it is local to your machine, and every step is undoable. This lesson shows exactly why conflicts happen, how to read the markers, how to resolve them in VS Code, and how to make them rarer.
Conflict resolutionBranching and mergingUndo and recovery
Rewriting history safely: rebase, squash, cherry-pick, stash
Git lets you tidy your commits before others see them: replay a branch on top of the latest main, squash five messy commits into two clear ones, copy one fix onto a release branch, or put half-done work aside. All of these make new commits instead of editing old ones, and that single fact tells you when they are safe.
Rewriting historyCommit hygieneBranching and merging
Undo anything: restore, reset, revert and reflog
Almost every Git mistake can be undone, if you pick the right tool. The right tool depends on two questions: where is the mistake (your files, the staging area, or a commit), and has anyone else seen it? This lesson maps each undo command to exactly what it moves, then breaks things on purpose and recovers each time.
Undo and recoveryRewriting historyStaging and committing
Inside the .git folder: objects, refs and HEAD
Everything Git knows about your project lives in one hidden folder. It holds only two kinds of thing: objects named by a fingerprint of their content, and small name files that point at them. Once you have walked from HEAD to a file's bytes by hand, every command in this course stops being magic.
Git internalsGit fundamentalsUndo and recovery
Capstone: Clean up the Store app repo before the festival release
A realistic project with a rubric and a model answer.
Final exam and certificate
10 questions drawn at random, 70% to pass.
Capstone project
Clean up the Store app repo before the festival release
It is the week before the festival rush, and Ken, Mangrove Market's engineering manager, asks you to get the store-app repository ready for release 2.1. Build the starting state yourself in a local repository, with a bare repository as the shared remote: main with a few commits; a feature branch feature/expiry-alerts with seven messy commits (wip, fix typo, more wip) that also changes the same pricing lines as main; release/2.1, created from main; a crash fix committed on main after the release branch was cut; a bad commit already pushed to main; and a .env file with a fake API key plus a large demo video committed by mistake. Then fix it all the way this course teaches: squash the feature into clear Conventional Commits, merge it with a merge commit, resolve the pricing conflict with a test for each side's rule, get the crash fix onto release/2.1 and tag v2.1.1, undo the bad pushed commit, and deal with the secret and the video. Write it up so Imran, the Store app's product manager, can follow every step without reading the code.
You will hand in
- The repository as a zip file or a link, plus the output of git log --oneline --graph --all with a short note beside each important commit
- A test file that passes on the merged result and proves both pricing rules, with the test output pasted into your notes
- An annotated tag v2.1.1 on release/2.1 that contains the crash fix, cherry-picked with -x
- A one-page incident note for Imran about the .env file and the video: what you did, what must still happen, and what cannot be fixed without rewriting history
- A half-page Git rules page for the team: branch names, merge style, when rebasing is allowed, which branches are protected, and an undo playbook
Check what you know
Already know some of this? Answer 7 quick questions, one from each lesson, and we will mark the lessons you can skim. It takes about 4 minutes and nothing is graded.
Questions
How long does the course take?
About four and a half hours: seven lessons of 35 to 40 minutes each, including the Build-it steps, checkpoints and practice. Each lesson also has an optional podcast episode of about 10 to 12 minutes. The capstone project takes 2 to 6 hours. You can stop after any section and pick up later.
Do I need to know Git already?
No. The first lesson starts from zero and explains every term as it appears. You should be able to open a terminal and edit a file in an editor such as VS Code; the Your Developer Setup course covers that if you are new. If you already use Git, the early lessons go fast and the later ones on rebase, undo and internals are where most experienced developers learn something new.
What do I need to install?
Git (any recent version; the outputs shown are from Git 2.55, and older versions print almost the same) and a terminal: Git Bash on Windows, Terminal on macOS or Linux. VS Code is recommended, and Node.js 22 or newer is used in a few Build-it steps to run small tests. No GitHub account is needed: every lesson works on your own laptop, with a local folder standing in for the shared remote. The practice exercises and simulators run in your browser with nothing installed.
I am a product manager. Is this course for me?
Yes, if you work with developers. Each lesson has a Bring it to your team section with questions to ask in reviews, and the Mangrove Market examples show what each idea means for releases and incidents. The JavaScript exercises are optional for you, but they are short, and trying them is a good way to see how Git decides things.
Is the certificate free, and how does the exam work?
Yes, the certificate is free, like everything else on Kolom. The final exam picks 15 random questions from the course's question bank, you need 70% to pass, and if you do not pass you can try again after 24 hours with a new set of questions.
Is it really free?
Yes. Every lesson, podcast episode, exercise, quiz, final exam and certificate is free. The labs and their templates for real work are free too. Plus and Premium add every lab challenge, weekly extras and a mentor on top, and they never lock the tools or the courses.