Skip to contentSkip to conversation

Count the line of codes

DISCUSSION zyk 4 participants 4 messages Jun 15, 2016

lore
Share & tools
lore

zyk

author
#0 lore raw

Does anyone know if there is any tools available for counting the line of codes in the project using GIT?

How to count the code changes on the specific branch?
How to count the delta lines between one tag and its successive tag?

Signature · 2 lines
View this message in context: http://www.nabble.com/Count-the-line-of-codes-tp21868069p21868069.html
Sent from the git mailing list archive at Nabble.com.
#1 lore raw
Quoted 3 lines · zyk

Does anyone know if there is any tools available for counting the line of codes in the project using GIT?

wc -l *.c *.h for example would count the lines of all c-files and their headers.

Quoted 2 lines

How to count the code changes on the specific branch?
How to count the delta lines between one tag and its successive tag?

git diff tag~..tag --stat

Greetings,
Jojo

Signature · 4 lines
Johannes Gilger <[email protected]>
http://hackvalue.de/heipei/
GPG-Key: 0x42F6DE81
GPG-Fingerprint: BB49 F967 775E BB52 3A81  882C 58EE B178 42F6 DE81
#2 lore raw
Quoted 7 lines · Johannes Gilger
Quoted 3 lines · zyk

Does anyone know if there is any tools available for counting the line of codes in the project using GIT?

wc -l *.c *.h for example would count the lines of all c-files and their headers.

wc for the total number of lines in files, or
http://www.dwheeler.com/sloccount/ to get the number of lines of code (excluding blank lines and such).

Signature · 1 line
Matthieu
#3 lore raw
Quoted 6 lines · Matthieu Moy
Quoted 5 lines · Johannes Gilger
Quoted 3 lines · zyk

Does anyone know if there is any tools available for counting the line of codes in the project using GIT?

Quoted 6 lines
Quoted 2 lines

wc -l *.c *.h for example would count the lines of all c-files and their headers.

wc for the total number of lines in files, or
http://www.dwheeler.com/sloccount/ to get the number of lines of code (excluding blank lines and such).

Or Ohcount (OSS part of Ohloh) from http://labs.ohloh.net/ohcount

Or GitStat (but that is web-based) which you can see at work at
http://mirror.celinuxforum.org/gitstat/

Or git-statistic GSoC 2008 project http://repo.or.cz/w/git-stats.git

HTH

Signature · 3 lines
Jakub Narebski
Poland
ShadeHawk on #git