Git Tutorial: Learn and Practice Git in Your Browser

Practice Git in Your Browser

Run real Git commands against a live repository and watch what each one does. No install, no sign-up. Start with your first commit and work up to fixing merge conflicts.

Learn Git by running real commands in a browser terminal. A free, hands-on path from your first commit to branching, merging, and fixing the problems that go wrong in real work, with nothing to install.

Git is easiest to learn by doing. This page is a free, hands-on Git tutorial where you run real Git commands in a browser terminal and watch the repository change after every one. There is nothing to install and no account to create.

A path from your first commit to real trouble

The Git lessons follow an order you can take from zero:

  1. What is Git? — version control explained before you touch a command
  2. Git Basicsinit, add, commit, and reading the log
  3. Git Branching — branches, diff, checkout, and moving through history
  4. Git troubleshooting — the situations that actually break at work: undoing a commit, resolving a merge conflict, committing to the wrong branch, recovering lost commits, and more.

Every lesson is a mission checked against the actual state of the repository, not a multiple-choice quiz. Browse them all on the tutorials list.

Real Git, not a pseudo-simulation

The terminal implements the real git workflow: commits with real hashes, branches, merges, rebases, conflict markers, reflog, and stash all behave the way they do on a real machine. That is the difference from watered-down "learn Git" toys: what you practise here is exactly what you will type at work.

NOTE

Just want a repository to experiment in? Free Play gives you the same terminal as an open sandbox.

Safe to break

Everything runs in a virtual repository inside your browser tab. Force-push, hard-reset, delete a branch, cause a conflict on purpose: mistakes cost nothing, and reloading the page gives you a clean repository. That safety is what lets you practise the scary commands until they are no longer scary.

Frequently asked questions

What is the best way to learn Git?

By running the commands yourself, not just reading about them. Git only clicks once you have made commits, created branches, and recovered from a mistake. Here you type real Git commands against a real repository and watch the history change after each one, which is why it sticks.

How can I practice Git online for free?

Pick any Git tutorial on this page and start typing. Each lesson gives you a repository already set up for the situation you are learning, so you can run commit, branch, merge, and rebase in a browser with no install and no sign-up.

Do I need to install Git to practice here?

No. The terminal runs entirely in your browser tab and simulates real Git behaviour, including branches, merges, rebases, and reflog. When you later use Git on your own machine, the exact same commands work.

I have never used Git. Where should I start?

Start with 'What is Git?', which explains version control before any commands. Then 'Git Basics' covers init, add, commit, and log, and 'Git Branching' covers branches, diffs, and history. After that the troubleshooting lessons cover real problems.

Is this real Git or a simplified version?

It behaves like real Git. Commits get real hashes, branches and merges work as they do on a real machine, and conflict markers, reflog, and stash all behave faithfully. The muscle memory you build here transfers directly to the command line at work.

How do I practice fixing Git mistakes like a bad commit or a merge conflict?

The troubleshooting lessons drop you straight into the broken situation: a commit on the wrong branch, an unresolved merge conflict, a commit you thought was lost, a secret you committed by accident. You practise the recovery safely, as many times as you like.