What is the difference between git bisect and git blame?
git blame shows who last changed each line of a file and in which commit. git bisect finds which commit introduced a behavior by testing the project at different points in history.
Explain it simply
Blame looks at one file line by line: 'who last touched this line?'. It is quick, but the last person to touch a line may only have reformatted it, not caused the bug.
Bisect ignores files and tests behaviour. It asks, 'at which commit did the app start misbehaving?'. Use blame to understand code and bisect to track down a regression whose cause is not obvious. Use git blame -w to ignore whitespace changes and -L 10,20 to limit lines.
Example
git blame -L 10,20 cart.js
# 3f9c2ab (Asha 2026-08-11) total = price * qty
git bisect start HEAD v1.0What to say in the interview
"blame annotates lines with the commit and author that last changed them, while bisect searches history by testing behavior to find the commit that introduced a bug. I use blame to understand code and bisect for regressions."