Tools
git-sim viewer
Watch Git commands play out one step at a time. Pick a demo on a sample repository below, or run git-sim locally in your own repo to open the simulation in this web viewer, or paste a git-sim link below to open it now.
Git Workflow Demos
A few commands in a row, the way you'd really run them, played step by step.
-
A feature branch, start to finish7 steps
Branch off main and commit on the branch while main moves on too, then merge the branch back and delete it.
- git switch -c feature/search
- git commit -m "Add search box"
- git commit -m "Add search tests"
- git switch main
- git commit -am "Update README"
- git merge feature/search
- git branch -d feature/search
-
Rebase a branch, then fast-forward3 steps
Replay a feature branch on top of main, so merging it is a fast-forward.
- git rebase main
- git switch main
- git merge feature/pagination
-
From an edit to a commit5 steps
A new file and an edit move from the working directory to the staging area and into a commit.
- new file search.html
- edit app.py
- git add search.html
- git add app.py
- git commit -m "Add search box"
-
Stash, fix something else, come back6 steps
Put unfinished work aside, fix a bug on its own branch, merge it, and pick the work back up.
- git stash
- git switch -c hotfix/login
- git commit -am "Fix login form"
- git switch main
- git merge hotfix/login
- git stash pop
-
Undo a hard reset with the reflog2 steps
Throw away two commits with reset --hard, then get them back from the reflog.
- git reset --hard HEAD~2
- git reset --hard HEAD@{1}
-
Tag a release, then ship a hotfix6 steps
Tag a release, fix a bug on a hotfix branch, merge it and tag the patch release.
- git tag v1.0.0
- git switch -c hotfix/1.0.1
- git commit -am "Fix login form"
- git switch main
- git merge --no-ff hotfix/1.0.1
- git tag v1.0.1
Individual Git Command Demos
One command on a sample repository, before and after.
Combine and rewrite history
Branches and tags
Undo and set aside
Files and commits
Remotes
Inspect and set up
Initial CommitDevlands
How to use this page
- slider / ▶Drag the slider, or press play, to watch the command happen. Before and After jump to either end.
- ← → · spaceStep through a multi-step command; space toggles Before / After.
- APlay or pause the loop (the page opens playing). Any manual input takes over.
- hoverA commit shows its message, author, date and parents, with its history highlighted.
- clickCopies the commit sha.
- ctrl + wheelZoom around the cursor (pinch on a trackpad). Double-click resets the view.
- EscStop playback, reset the view, close this menu.
- shareThe Share button copies a link to this graph, copies it as an image, downloads PNG/SVG/page, or posts it. #before, #after or #step=N in the link pins the state.
Workflow
Step 1 / 6
Opening the simulation… The graph is decoded from the link inside your browser; nothing about the repository was sent to this server.
Made with git-sim, a free, open-source tool that simulates any Git command on your own repository before it runs, records live Git activity on your repo during a coding session, and catches destructive commands from AI agents.