Git log line selection
How to follow changes on lines of a file?
Since git 1.8.4 you can git log just a bunch of lines in a file.
$ git log -L<Line number>,<range>:<filename>
To see changes on lines 4 to 32, in app/assets/javascripts/application.js
$ git log -L4,32:app/assets/javascripts/application.js
To see changes on 10 lines, after line 20, in app/assets/javascripts/application.js
$ git log -L20,+10:app/assets/javascripts/application.js
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#