Git: discover which commits ever touched a range of lines

Since Git 1.8.4, git log has -L to view the evolution of a range of lines. For example, suppose you look at git blame‘s output: ((aa27064…))[mlm@macbook:~/w/mlm/git] $ git blame -L150,+11 — git-web–browse.sh a180055a git-web–browse.sh (Giuseppe Bilotta 2010-12-03 17:47:36 +0100 150) die “The browser $browser is not a180055a git-web–browse.sh (Giuseppe Bilotta 2010-12-03 17:47:36 +0100 151) fi … Read more

How can I view prior commits with git blame?

git blame -L 10,+1 fe25b6d^ — src/options.cpp You can specify a revision for git blame to look back starting from (instead of the default of HEAD); fe25b6d^ is the parent of fe25b6d. Edit: New to Git 2.23, we have the –ignore-rev option added to git blame: git blame –ignore-rev fe25b6d While this doesn’t answer OP’s … Read more