What Git said
Every command in a day of Git Game prints what Git prints: ! [rejected],
(forced update), Already up to date. These pages take the lines one at a time: what
Git checked, what to do now, and why a day of the game did it to you. Every line on them is captured from a real
Git by a script, never typed, and each page names the Git that printed it.
When you pushed
-
! [rejected] main -> main (non-fast-forward)
Rejected: non-fast-forward
Someone's commit reached
mainbefore yours. Why Git refuses, the two hints it prints, and the pull that fixes it. -
+ 7a20dd4...864afd7 main -> main (forced update)
Forced update
The push went through, and that is the problem. What
--forceerased, what the others see, and what--force-with-leaserefuses.
When you pulled
-
CONFLICT (content): Merge conflict in api.py
Merge conflict
Two commits changed the same lines. The markers Git leaves, resolving by hand under a merge and a rebase, and what
-X oursand-X theirskeep. -
Fast-forward
Successfully rebased and updated refs/heads/main.
Merge made by the 'ort' strategy.
Fast-forward and rebased
The three ways a pull lands, and which one you get.
-
Already up to date.
Everything up-to-date
Nothing to do, two spellings
Why a pull and a push spell it differently, what each checked, and the
git statusline between them.
The ways out
-
Your branch and 'origin/main' have diverged,
Someone force-pushed over my commit
It is still in your clone. The rebase that puts it back, the pull that would drop it, and how the forcer undoes it.
-
! [rejected] main -> main (non-fast-forward)
My push was rejected
Two commands, the setting that makes them one, and when a force is right.
-
HEAD is now at 5a5bc93 auth: check the token
I lost a commit
A reset too far, a deleted branch, a rebase that dropped it: the reflog has all three.
-
7742196e73c4f9d00384d5d5b6fd8497d2fff238 is the first bad commit
Who broke main
The line, the word, the first bad commit:
blame,log -Sandbisect. -
[main 3132ca8] Revert "api: handle the edge case"
Undo a commit that's on main
A new commit that takes it back, and why a reset and a push won't.