October 2016
Beginner
861 pages
20h 37m
English
The bisect command is good when you don't know where in your code there is a bug, but you can test for it and thereby find the commit that introduced it. If you already know where in the code the bug is but want to find the commit that introduced it, you can use git blame. The blame command will annotate every line in the file with the latest commit that touched that line, making it easy to find the commit ID and then the full context of the commit.
We'll use the same repository and branch as in the bisect example:
$ git clone https://github.com/dvaske/cookbook-tips-tricks.git $ cd cookbook-tips-tricks $ git checkout bug_hunting
We know that the bug is in map.txt on lines 37-39. To annotate each ...