How do you investigate "it worked yesterday" regressions using Git?
IntermediateProductionRecovery and incident handling
Answer
Narrow by time and path, then bisect. List what changed in the deploy range, compare the exact SHAs running in each environment, and run git bisect run with a reproducer test.
git log --since="yesterday" --oneline -- services/payments
git bisect start HEAD <last-good-sha> && git bisect run ./repro.sh
More on Recovery and incident handling
Someone force-pushed over main and 12 commits vanished. How do you recover?IntermediateAfter recovery, what do you change so a force-push to main cannot happen again?AdvancedA bad migration commit was deployed. Walk through your response in the first 15 minutes.IntermediateHow do you recover a deleted repository or branch on GitHub?IntermediateHow do you find who or what pushed a specific commit to a protected branch?AdvancedCI is red on main after a merge. What is your policy?Intermediate