Five months ago, one command deleted 130 of my commits. On Friday I was one command away from deleting 1081. The reason git never warned me was the fix I applied in March.
Back in March I ran git push --force and watched eight months of history collapse into a single commit. I recovered most of it from a branch called "archive" that I had made three weeks earlier by accident. That story was the first post I ever wrote in this series.
Here is a part I did not know until Friday... When I recovered, my local clone quietly started tracking that archive branch instead of main. So for five months git compared my work against a frozen snapshot and reported, every single time, that everything was fine.
It was fine. Against the wrong branch.
Meanwhile I kept uploading files through the GitHub website, the way I always have. Real project moved on. My clone did not. Neither of them told the other.
On Friday I finally sat down to do it properly, folder by folder, clean commits. And before pushing I ran one check I had never bothered with:
git rev-parse --abbrev-ref {u}
It said origin/archive.
Then the numbers landed. My clone was 1081 commits behind. Pushing it would have changed 523 files and deleted 145,201 lines that exist only on GitHub. Five months of work, uploaded by hand, evening after evening, gone in one command that git would have accepted without a word.
I did not push.
Then I did something dumber. Cleaning up two local commits, I ran git reset --hard, which also wiped the uncommitted work of that entire day. New assistant flows. Guide links. All of it.
It came back only because I had made a full folder backup an hour earlier, for exactly this reason. Restored, verified file by file, 331 tests green.
Five months of writing about tools that report success while doing nothing. Then my own git status did exactly that.
So if you take one thing from this, take the command:
git rev-parse --abbrev-ref {u}
Two seconds. Run it on your main project before you read anything else. A quiet git status proves nothing when the branch is watching the wrong remote. I would genuinely rather this post cost me some dignity and save one person their history.
This is also what building alone actually looks like. No second pair of eyes, no reviewer, nobody to say "hold on, check your upstream first". Just you, a terminal, and whatever discipline you managed to build.
This week
- Sync the clone properly. Backup, fetch, rebuild on top of what is there. Slowly.
- v1.8.7 out of the Store queue. Guided AI flows, 23 guides reachable from inside the app, and TURBO that finally prints a receipt.
- The Polish guides hub still has no offline search. Last thing standing between the Polish and English sites.
Taxi by day. Repairing a five-month-old mistake by night.