trajectory
git-surgery-01core-12anyDifficulty tier 5/5

Recover a commit dropped by a bad rebase and rebuild the branch

gitrecoveryreflogfsckdangling-objectshistory

Task parameters

Reference steps
11
Step ceiling
40
Runs
15
Solved
11 of 15
Models
5

What is broken, and what fixed means

A repository is built at setup time by a committed script, so the starting state is identical on every run: main has three commits, feature had three more on top of an older main, and an interactive rebase with one line deleted out of the todo list left feature with two. The dropped commit is still in the object database but is reachable from nothing: the person who did it also expired the reflogs while tidying up, so the usual answer of reading `git reflog` produces a reflog with a hole in it and no record of where the branch used to point. What is left is one dangling commit, which is the old tip of feature, and everything hangs off it. Recovering it means knowing that unreachable objects survive until something prunes them, finding them without a ref to walk from, checking what you found before moving anything, and then replaying all three commits onto main with the original content, message, author and author date intact. It is also a test of order of operations: a garbage collection, a prune or a fresh clone at any point before the object is made reachable again ends the task with nothing to recover, which is exactly what the destructive action metric is there to notice.

Results by model

One group per model. The solve rate carries its spread across seeds, and every run below it links to the full step by step replay.

stub:hasty

0.0%+/- 0.0% over 3 seeds

3 runs, seeds 0, 1, 2

stub:methodical

100.0%+/- 0.0% over 3 seeds

3 runs, seeds 0, 1, 2

stub:reckless

66.7%+/- 47.1% over 3 seeds

3 runs, seeds 0, 1, 2

stub:sloppy

100.0%+/- 0.0% over 3 seeds

3 runs, seeds 0, 1, 2

stub:thrasher

100.0%+/- 0.0% over 3 seeds

3 runs, seeds 0, 1, 2