Skip to content

↑↓ moveEnter openEsc close

Git practice

Git 2.51 · 77 commands · checked Nov 2026 · Source: Git reference

Read what to do, then type the Git command. One short lesson at a time, with reviews spaced out as you remember them.

77 commands in 11 lessons. Your progress is kept in this browser.

Lessons

  1. 1Setting up6 commands

    git config --global user.name "Ada Lovelace"git config --global user.email ada@example.comgit initgit clone https://github.com/acme/shop.gitgit config --global init.defaultBranch maingit config --list

  2. 2Staging and committing, part 16 commands

    git statusgit status -sgit add cart.jsgit add -Agit add -pgit commit -m "Fix total"

  3. 3Staging and committing, part 26 commands

    git commit -am "Tidy"git commit --amend --no-editgit diffgit diff --stagedgit rm --cached .envgit mv old.js new.js

  4. 4Branches10 commands

    git branchgit branch -agit branch featuregit switch maingit switch -c featuregit switch -git branch -m maingit branch -d featuregit branch -D spikegit branch --merged

  5. 5Merging and rebasing8 commands

    git merge featuregit merge --no-ff featuregit merge --abortgit rebase maingit rebase -i HEAD~3git rebase --continuegit rebase --abortgit cherry-pick a1b2c3d

  6. 6Remotes10 commands

    git remote -vgit remote add origin https://github.com/acme/shop.gitgit fetchgit pullgit pull --rebasegit pushgit push -u origin featuregit push --force-with-leasegit push origin --delete featuregit fetch --prune

  7. 7History, part 16 commands

    git loggit log --onelinegit log --oneline --graph --allgit log cart.jsgit log -pgit log --author=Ada

  8. 8History, part 25 commands

    git log --grep=logingit show a1b2c3dgit blame cart.jsgit refloggit diff main feature

  9. 9Undoing changes9 commands

    git restore cart.jsgit restore --staged cart.jsgit restore --source a1b2c3d cart.jsgit revert a1b2c3dgit reset --soft HEAD~1git reset HEAD~1git reset --hard HEAD~1git reset --hard origin/maingit clean -fd

  10. 10Stashing7 commands

    git stashgit stash push -m "half-done login"git stash -ugit stash listgit stash popgit stash applygit stash drop

  11. 11Tags4 commands

    git taggit tag -a v1.0 -m "First release"git push --tagsgit tag -d v1.0

How practice works

Each question describes a job, such as "create a branch called feature and switch to it", and you type the Git command that does it. Spacing and quote style do not matter, and common alternatives (git switch or git checkout) are both accepted.

  • Learn shows each new command with its answer to type once, then asks for it again without help, and schedules the next review.
  • Practice goes through a lesson at your own pace. Press Esc to see the answer. It does not change your reviews.
  • Speed run asks every item once, without answers, against the clock. Get 70% right first time to pass.
  • Today's session brings back what is due for review plus a few new ones.

A wrong answer tells you what was off, such as the text a pattern missed. After two tries the answer is shown, and you type it to move on. Progress is stored in this browser only; the daily goal and streak are shared with the keyboard shortcut practice.

To look something up instead, use the git commands list.