Interview Q&A / Git & GitHub

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What is the difference between git bisect and git blame?

SHORT ANSWER

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

bash
git blame -L 10,20 cart.js
# 3f9c2ab (Asha 2026-08-11) total = price * qty
git bisect start HEAD v1.0

What 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."

#git#bisect#blame

Related questions

Practise more Git & GitHub questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Git & GitHub quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.