ReadbackLesson 11In progress
5 steps · 35 minutes · one terminal

THE READBACK

One repository you have never seen. Four things were done to it and none of them are written down anywhere. Everything you need to name all four is already in the repository, and you already know every command.

The brief

Claim · one repository, four questions

An agent has been working in a repository for a week. It is now yours. There is no changelog, no pull request description worth reading, and nobody to ask — which is the ordinary situation, not a contrived one.

Four things were done to this repository. Your job is to name all four, from the repository alone.

  1. What landed on main, and by which method?
  2. Is anything still outstanding on a branch that looks finished?
  3. Is anything missing — and can you get it back?
  4. Which of the branches still in flight are going to collide?

Every command you need was taught in lessons 01 to 10. Nothing below tells you which one to reach for; that is the whole exercise. Read a question, try it in your terminal, and only then read on.

The repository these readouts came fromDownload build-l11.sh

The repository this lesson is about. It builds a bare remote and the clone an agent worked in — including the agent’s reflog, which is the point.

Save it beside you, read it — it is short — and then:

bash build-l11.sh /tmp/l11
cd /tmp/l11

Read the script afterwards, not now: it is a full confession, and reading it first turns the lesson into a comprehension test. Every hash printed below reproduces exactly on your machine, rebased commits included — two consecutive builds were diffed byte for byte to confirm it.

Answer before you move on

Before you start. Which of these can git log --oneline alone never tell you about a branch?

What you can check after this step

Nothing yet — but you should now have a repository at /tmp/l11/app and four questions. Every readout from here on came from that repository, so anything you run should match what you read.

What landed, and how

Claim + proof · git log, two ways

Start where you always start. The shape first, and only then the detail.

an honest state, not a theme
Executed, output verbatimQuestion 1
$ git log --graph --oneline --decorate --all
* 39a6b74 (agent-docs) Document the dev server
| * 6f488b6 (agent-timeout) Raise the timeout
|/
| * 95f3e4d (agent-cache) Cache responses
|/
* ad946de (HEAD -> main, origin/main, parse-safety) Parse safely
* c58e814 Add the parser
* 33f8a17 Add the checkout flow (#12)
| * e771909 (checkout-flow) Add a currency
| * 1a97a97 Fix the checkout return value
| * 9740597 Start the checkout flow
|/
* 5df2ce2 Add a timeout
* 7e95f11 Add the API client

Five commits on main, two branches hanging off it that were never merged into anything, and three tips further up. Read the message on 33f8a17 — the (#12) suffix is a pull request number, and one commit carrying a PR number is the signature of a squash.

Two different landings, in one history, and the graph alone tells you neither.

ad946de and c58e814 were written two days before they were applied. A rebase preserves the author and rewrites the committer, so that gap is replayed history — and both of them arriving with the same committer date means they were replayed together, in one operation. That is parse-safety, rebased onto main and fast-forwarded. Note that its branch ref still sits on main’s tip: after a fast-forward there is nothing to distinguish the branch from the trunk.

33f8a17 has no gap, one commit, and a PR number. Compare it against the three commits sitting unmerged on checkout-flow below it.

5df2ce2
Add a timeout
7e95f11
9740597
Start the checkout flow
5df2ce2
e771909
Add a currency
checkout-flow
1a97a97
33f8a17
Add the checkout flow (#12)
5df2ce2
The parent fields git log --oneline will not print. 33f8a17 names 5df2ce2 — the commit before the branch started — not e771909. So the branch’s work is in main and the branch itself is reachable from nothing. That is a squash, and it is visible here as a fact about one field.
Answer before you move on

Two commits share a committer date two days after their author dates. What happened?

Answer to question 1

Two branches landed, two different ways. checkout-flow was squash-merged as 33f8a17 — one commit, a PR number, and a parent that skips the branch entirely. parse-safety was rebased and fast-forwarded — two commits with author dates two days before their committer dates. Run both commands on a repository of your own and you can say the same thing about it.

3 of 5 steps remain

What is still outstanding

You have read the first 2 steps in full — a claim and the verification that settles it. The rest of this lesson, and the 10 lessons after it, open when subscriptions do. Nothing that is free today will be taken away then.

Read the free reference
Subscriptions open soon
the free preview stays