WebMay 26, 2011 · 5 Answers Sorted by: 56 To see commits affecting line 40 of file foo: git blame -L 40,+1 foo The +1 means exactly one line. To see changes for lines 40-60, it's: git blame -L 40,+21 foo OR git blame -L 40,60 foo The second number can be an offset designated with a '+', or a line number. git blame docs Share Improve this answer Follow WebMar 29, 2016 · It cannot be used to count the number of lines of code, is it is language agnostic and cannot tell a line of code from a comment. However, if you need the total number of lines in the file you can use the command: git log --numstat --format=oneline -- file.txt grep file.txt$. to get a history of changes on the specified file.
kernel.org
WebLines of code per developer git ls-tree -r HEAD sed -Ee 's/^. {53}//' \ while read filename; do file "$filename"; done \ grep -E ': .*text' sed -E -e 's/: .*//' \ while read filename; do git blame --line-porcelain "$filename"; done \ sed -n 's/^author //p' \ sort uniq -c sort -rn Listing each branch and its last revision's date WebApr 27, 2012 · How to show the first 10 commit in git from beginning to end. (no branch) How the specify the commit index and log it. (show the second or third) I know that git use parent to link the commit, it's easy to log the commit from end to start. like: git log HEAD~10 But i need to query from the start to end, is it possible? git logging Share budget self contained campervan auckland
How do I show statistics for author
WebJun 3, 2024 · In this series, I would like to show you a few git log commands--git log--one-line--graph-p--stat; git log. This command displays the complete details of all commits … WebNov 16, 2011 · ( eval $ (git log --pretty="%H" --since="2 day" while read line; do if [ [ -z $ {first} ]]; then first=$ {line}; echo "export first=$ {first}"; fi; echo "export last=$ {line}"; done; ) ; git diff --stat $ {first} $ {last}; ) you can easily modify the "2 day" to get something else :) Share Follow answered Sep 6, 2012 at 9:54 Markus Duft 121 1 4 WebFeb 19, 2024 · git log -S to the rescue! You see, git log -S lets you find all instances of a string in your repo's history. It's fantastic for finding deleted code. $ git log -S … budget self contained apartments sydney