Beginner · Free · In your browser

Learn Git & GitHub

Learn the version control that almost every software team uses, in a safe practice terminal with a simulated GitHub. Turn a folder into a repository, save focused snapshots and read the history; undo changes safely with restore, revert, reset and stash; work on branches, merge them and resolve conflicts; push to GitHub, clone, pull and recover from a rejected push; propose changes with pull requests; keep passwords and keys out of your repositories; and finish by shipping a tagged release.

20 lessons6 modules3.3 hours of practice4 challenges
Start the Git & GitHub course →

No installation. Your code runs right in the browser. Basic terminal commands such as cd, ls, cat and echo; the Linux Command Line course teaches them. Everything runs in a safe practice terminal with a simulated GitHub, so nothing you type reaches a real account.

What you will be able to do

Course outline

Module 1

Your first repository

Create a repository, set your identity, save snapshots, and read the history.

  1. Start tracking a projectgit init & git status · 7 min
  2. Tell Git who you aregit config · 6 min
  3. Save your first snapshotsgit add & git commit · 9 min
  4. Read the historygit log & git show · 8 min
Module 2

Everyday changes

Read diffs, undo uncommitted changes, ignore files, and write commits people can read.

  1. See exactly what changedgit diff · 8 min
  2. Undo changes you have not committedgit restore · 9 min
  3. Ignore what does not belong.gitignore · 9 min
  4. Write commits people can readFocused commits & --amend · 9 min
Module 3

Branches

Work on branches, merge them, resolve conflicts, and ship a feature in a project.

  1. Work on a branchgit branch & git switch · 9 min
  2. Merge your workgit merge · 10 min
  3. Resolve a merge conflictMerge conflicts · 11 min
  4. Project: ship a feature on a branchProject: branch, commit, merge · 14 min
Module 4

Working with GitHub

Push to GitHub, clone and pull, and handle a rejected push.

  1. Put your project on GitHubgit remote & git push · 9 min
  2. Clone and stay up to dategit clone, git fetch & git pull · 10 min
  3. Pull before you pushRejected pushes & git pull --rebase · 10 min
Module 5

Teamwork and fixing mistakes

Pull requests, revert and reset, and putting work aside with stash.

  1. Propose changes with a pull requestPull requests & the GitHub CLI · 12 min
  2. Undo a commit: revert and resetgit revert & git reset · 11 min
  3. Put work aside with stashgit stash · 9 min
Module 6

Safe releases and the capstone

Keep secrets out of Git, then ship a release from branch to tag.

  1. Keep secrets out of GitSecrets, .env & push protection · 12 min
  2. Capstone: ship a releaseCapstone: from branch to tag · 16 min

Ready for your first line?

Every lesson is short, hands-on, and checked automatically.

Start learning Git & GitHub →