Gitflow
🕵️Blame DetectiveEasy+400 XP
Scenario reference

Blame Detective: the situation, step by step

The situation

Customer bug in payment calculation. Need to find who changed that code, when, why — then decide revert or fix-forward.

Bug is in payment.js. Calculation was correct 2 weeks ago.

Easy · 5 steps · +400 XP

What you will practice

This scenario walks through 5 steps, in order:

  1. 01Blame the payment file
  2. 02View the suspicious commit (two back from the tip)
  3. 03Check recent file history
  4. 04Search for the broken function
  5. 05Revert the bad commit
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Blame the payment file
    git blame payment.js
  2. 2. View the suspicious commit (two back from the tip)
    git show HEAD~2
  3. 3. Check recent file history
    git log --oneline payment.js
  4. 4. Search for the broken function
    git log -S "calculateTotal"
  5. 5. Revert the bad commit
    git revert HEAD~2

Key takeaway

blame → show → log → grep → revert. Standard debugging pipeline.