Skip to main content

Git Concepts Simulator

Practice Git in an interactive browser terminal with a visual repository model. Learn the working directory, staging area, local commits, branch pointers, remotes, fast-forward merges, fetch, and rebase.

Category: DevOps

Topics covered: git, version-control, terminal, branches, commits, merge, rebase, devops, educational, interactive

// simulator

Git Concepts Simulator

Practice Git in an interactive browser terminal with a visual repository model. Learn the working directory, staging area, local commits, branch pointers, remotes, fast-forward merges, fetch, and rebase.

Supported byDigitalOceanDevDojoSMTPfastQuizAPIBecome a sponsor

// git mental model lab

Git Concepts Simulator

Practice Git by watching files move through the working directory, staging area, local repository, branch pointers, and remote repository.

Progress0/26

main

Branch

0

Staged

0

Working

Lessons
Lesson 1 / 6
Step 1 / 4

Start by checking where the lab repository lives.

git-concepts ~/repo
HEAD -> main

Welcome to Git Concepts Lab.

Type "help", run "git status", or follow the current task above.

$
Git Areas

Working Directory

Clean

Staging Area

Nothing staged

Local Repository

main -> b2c3d4e

working tree clean

Remote Repository

origin/main -> b2c3d4e

Commit Graph
b2c3d4e
HEAD -> main
origin/main

Add Alice

a1b2c3d

Add README

Pointer Model

HEAD follows main.

main points at b2c3d4e.

Branches and remote refs are labels. Commits are immutable snapshots with parent links.

About this Git simulator

What you'll learn

  • How the working directory, staging area, local repository, and remote relate
  • Why Git commits are snapshots with parent links
  • How branches and HEAD work as movable pointers
  • When a merge is a fast-forward instead of a merge commit
  • How fetch updates remote-tracking branches without touching your work
  • How rebase replays commits onto a new base

Key commands covered

  • Inspect: git status, git diff, git log, git branch
  • Snapshot: git add, git commit
  • Branch: git switch, git merge
  • Remote: git push, git fetch, git rebase

Concepts first

This lab is inspired by the “learn Git concepts, not commands” approach: commands make more sense once you can see what moved between the working tree, index, commits, branch labels, and remotes.

Browser-safe by design

This simulator does not run real Git. It models a small repository in the browser so you can experiment safely and build the mental model before using commands on real work.

Try next

Sponsored
Carbon Ads
$ cd /games
// share