Methodology

A run in a fresh, fictional repository can show exactly what a command did under those conditions. It cannot show what will happen in every repository, on every operating system or in a later Git release, so each page names its conditions.

The pinned release

All examples and records use one Git release, currently Git 2.56.0. The release, operating system and architecture are recorded with each run. When we move to a newer release, every example and record is run again, and changed results are published as a new dated edition rather than mixed with old ones.

How examples run

Each example starts from an empty directory and builds its own small history. The author is fictional, the time zone is UTC and commit dates are fixed, so the printed commit identifiers reproduce exactly. Examples use repository-relative paths and local text files only; no remote, hosted service or network is involved.

The state matrix

The Git operation state matrix records twenty operations, each in its own fresh repository. Before and after every command we record the current commit, branch, staged entries, file contents, status, stash count and exit code, then check the outcome against what the documentation says should happen. Every case is run twice. The scripts, run records and method are published so anyone can repeat them.

The command explorer

The explorer matches a task and a repository state to one of these recorded examples. It runs entirely in your browser from a fixed set of records: it makes no network requests while you use it, stores nothing, and shows every record and warning without JavaScript. A command that rewrites history or discards work can only be copied after you tick its warning. It never runs a command or reads a repository. Its behaviour was checked in a real browser at desktop and phone widths, and the record is published with the data.

What we publish

Observations and records are CC BY 4.0, and original code is MIT licensed. Each data set’s method file, hash list and source ledger are published with it. The Git documentation we cite keeps its own licence.