Learn Git by doing. Work through the lessons in order and you'll have a solid practical foundation — from your first commit to branching, rebasing, tagging, and rewriting history.
Before you start
To practice the exercises in this course on your computer, install Git (the program these commands run) — there are downloads for Windows, macOS, and Linux.
Setup & Core Workflow
Install Git, set your identity, initialize or clone a repository, and learn the working directory → staging → commit loop that everything else builds on.
Branching & Merging
Create, rename, and delete branches, merge them back together, and resolve merge conflicts when Git can't decide for you.
Remotes & Collaboration Conventions
Connect to GitHub, push and pull changes, fetch without merging, and write commit messages and branch names that stay readable months later.
Everyday Power Features
Stash work in progress, undo commits with reset and revert, inspect diffs, recover from detached HEAD, cherry-pick commits, rebase, and squash messy history.
Advanced — Reach for When Needed
Amend commits, rewrite history, force-push safely, tag releases, create patches, manage submodules, and automate checks with Git hooks.
GitFlow Branching Model
A visual guide to main, develop, feature, release, and hotfix branches — and how they fit together.