Use git bisect binary search to find exactly which commit introduced a regression bug.
Git Bisect — Find the Bug Commit
# Binary search through commits to find which one introduced a bug
git bisect start
git bisect bad # current commit is broken
git bisect good v1.0 # v1.0 was working
# Git checks out midpoint commit automatically
# Test it, then mark:
git bisect bad # if broken
git bisect good # if working
# Repeat until Git identifies the culprit commit
# Automate with a test script
git bisect run npm test
# Reset when done
git bisect reset
# Result: Git tells you exactly which commit introduced the bug