Skip to content
Home Tutorials Roadmaps Courses
Log in Join free
Tutorials Git Git Blame & Bisect
Git Beginner FREE

Git Blame & Bisect

Lesson 2 of 17 Beginner Interactive

git blame shows who last modified each line. git bisect binary searches for bug-introducing commits.

Syntax

GIT
git blame file.txt
git bisect start
git bisect bad
git bisect good v1.0
Git Blame and Bisect
BASH
# Blame - see who changed each line
git blame filename.txt

# Blame with line range
git blame -L 10,20 filename.txt

# Bisect - binary search for bugs
git bisect start
git bisect bad          # current commit is bad
git bisect good v1.0    # this tag was good

# Git marks a commit, you test it
git bisect good  # or git bisect bad

# When done
git bisect reset