The Symptom
Symptom
Timeline
-
1
-
2
-
3
-
4
-
5
-
6
Root Cause Analysis
Root Cause
This was a classic Git history rewrite collision. Developer B was working on a long-lived branch. When they executed `git rebase main`, they were confronted with a complex merge conflict regarding the database schema version file. In a panic to resolve the conflict, they accidentally accepted "their" changes (the outdated version of the schema) over the incoming changes, essentially erasing Developer A's commit from their local history. Because they had to use `git push --force` to update their PR branch after the rebase, the PR didn't show the deleted file clearly. When merged (using a Squash merge), the resulting commit on `main` effectively reverted Developer A's migration.
Resolution
Resolution
# Finding the lost commit
git log --all -S "stripe_customer_id"
# Found hash 8a9b2c. Cherry-picking it back.
git cherry-pick 8a9b2c
Discussions 0