Learn Git
Understand Git through short terminal drills and a live view of the working tree, staging area, branches, and history.
Start learning
Build real skills one lesson at a time
Explore the complete curriculum below, then start with the lesson that is right for you.
About this course
Git is how developers keep the history of a project, and every job expects you to know it. Most people learn three commands by copying them and hope nothing goes wrong. This course teaches what each command does to your project, so you can read what Git tells you and fix it when something does.
Every coding lesson opens on a small website with a real terminal under the files. You type Git commands, and a panel beside the editor shows the repository after each one: the working tree, the staging area, and the history. You watch a file go from modified to staged to committed instead of taking it on faith.
There is no submit button. The lesson checks each step off as the repository reaches that state, and Reset puts everything back if you end up somewhere you did not mean to.
What you'll learn
- How Git sees a project: the working tree, the staging area, and the repository
- Your first commits with
git add,git commit,git diff, andgit log - Working with files:
.gitignore,git mv, andgit rm - Undoing changes at every stage with
git restore,commit --amend,git reset, andgit revert - Branches: creating and switching, fast-forward merges, merge commits, resolving a conflict, and
git stash - Remotes and GitHub:
git clone,git push,git fetch,git pull, and pull requests
By the end you can put any project under version control, work on a branch, merge it, and share it through GitHub without guessing at what happened.
Prerequisites
- None. If you can open a file and type a command, you can start here. No programming language is required.
Every other course here gives you a project worth committing. HTML Basics (opens in a new tab) is a natural first one.
Course instructor
Brad Traversy
Founder of Traversy Media and an educator known for practical, project-focused web development courses.
Course content
Keep learning
More programming courses
Advanced course
TanStack Start Fundamentals
Take React full-stack with TanStack Start. Learn type-safe file-based routing, data loading with route loaders, URL search params, and server functions, then bring it all together in a complete full-stack project.
View courseBeginner course
JavaScript Basics
Learn the JavaScript language fundamentals (variables, types, control flow, arrays, objects, and functions) by running small programs in the console.
View courseBeginner course
JavaScript DOM
Take your JavaScript out of the console and into the browser. Select elements, respond to events, and build pages that react to the user.
View course

