Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7520235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:01:59+00:00 2026-05-30T02:01:59+00:00

I just installed GitStats , and I’m at that point where I have to

  • 0

I just installed GitStats, and I’m at that point where I have to say, “Now, what?”. I see examples on the site of user lines of code, etc., but no examples of how to get simple stats like that. I don’t need a chart or anything. I just want to be able to console output the results in a list of user -> lines of code or something. Any help is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:02:00+00:00Added an answer on May 30, 2026 at 2:02 am

    Update (July 11th, 2014)

    I’m not sure what version i had installed when I first answered this question, but the latest version gave me an authors.html file when I ran gitstats /path/to/repo/.git /path/to/output/dir/ that contained exactly the info I was looking for.

    Original Answer

    It’s pretty simple, I found. You just type:

    gitstats /path/to/the/repo.git --outputpath=directory_where_you_want_the_output
    

    It outputs the entire report with charts, navigation via tabs, etc.

    Note: You cannot tell how many lines each user has contributed (at least with the version of gitstats that an apt-get install gitstats got me). The output was useful, and is a great way to learn about your code base and its contributors. I did the following, to get the number of lines of a particular user:

    git log --author="Some Author <Some.Author@example.com>" --oneline --shortstat > some_author.txt
    

    Then, I used Python to parse the data (since there were hundreds of commits):

    >>> import re
    >>> file = open('some_author.txt', 'r')
    >>> adds, dels = 0, 0
    >>> for line in file.readlines():
    ...     am, dm = re.search(r'\d+(?= insertions)', line), re.search(r'\d+(?= deletions)', line)
    ...     if am is not None:
    ...         adds += int(am.group())
    ...         dels += int(dm.group())
    ... 
    >>> adds, dels
    (5036, 1653)
    >>> file.close()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just installed phonegap ios-sdk now I can see PhoneGap template in XCode v4.2. But
I just installed Visual SVN Server and I just found that I can access
I just installed iPhone SDK 3.0 and found that the text property of UITableViewCell
Just installed 2010 Express Edition and I cannot see Preprocess t4 template as an
Just installed the trial version of Visual Studio 2010 RTM. Now I keep getting
I just installed AnkhSVN to have subversion support from within Visual Studio 2010. I
Just installed SL5 and the toolkit, that were released few days ago. The bug
Just installed Nagios 3.2 and have it monitoring 4 or 5 windows hosts as
Just installed AnkhSVN and I see the equivalent of svn up but I'd prefer
Just installed Ubuntu 10.10. Previously I had Ubuntu 10.04. I have a shared partition

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.