Another way to count total lines of code
This command will help you to count total lines of git repo:
git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904..HEAD --shortstat
Example Output:
210 files changed, 4732 insertions(+)
where insertions represents the total lines of git repo.
Note:
- you should have git version > 1.8.5
- 4b825dc642cb6eb9a060e54bf8d69288fbee4904 - SHA1 of empty tree. You can always derive it with:
git hash-object -t tree /dev/null
Written by Sergey Zabolotnov
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#