Learn Git

Understand Git through short terminal drills and a live view of the working tree, staging area, branches, and history.

BTaught by Brad Traversy
4.8
7 enrolled

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, and git log
  • Working with files: .gitignore, git mv, and git rm
  • Undoing changes at every stage with git restore, commit --amend, git reset, and git 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

BT

Brad Traversy

Founder of Traversy Media and an educator known for practical, project-focused web development courses.

Course content