Learn Git By Doing — type a command, watch the graph change
An open-source Git trainer: a simulated terminal, a pure-function model of a repository, and a D3 graph that redraws after every command.
- Kind
- Web app
- Runs on
- Browser
- Stack
- React, TypeScript, D3.js, Zustand, Vite
- Status
- Prototype
- Written up
Learn Git By Doing puts the commit graph on screen. You type real Git commands into a simulated terminal in the browser, and a D3 visualisation of the working directory, the staging area, the commits and the branch labels redraws after each one. Nothing touches a real repository, so you can try reset --hard without fear.
It is a prototype: the core loop works, and several parts of Git are not modelled yet.
How it holds up
- A repository as plain data, a small typed object instead of real Git.
- Every command is a pure function from one repository state to the next.
- A merge has two parents, so the graph shows history as it is.
The full story is in the build log: Learn Git By Doing: type a command, watch the graph change.