Skip to content

celber/git-pretty-stats

 
 

Repository files navigation

Build Status

You know those cool graphs and statistics you can get for a repository on github? The things is that (unfortunately) not all git repositories are hosted on github for various reasons. This is the tool for rendering graphs for your repository that can be hosted anywhere, and it looks great.

Features (v0.2.1)

  • Handles multiple repositories
  • Handles bare repositories
  • Statistics
    • Total commits
    • Total contributors
    • Average commits per contributor
    • First commit date
    • Latest commit date
    • Active for (X days)
    • Average commits per day
  • Graphs
    • Commits by date
    • Commits by hour of day
    • Commits by day of week
    • Commits by contributor

Requirements

  • PHP 5.3
  • Git

Installation

Start by clone this repository and setup your web server

Install dependencies using Composer, e.g. php composer.phar install

Clone the repositories you want to statistics and graphs for in to the repositories folder.

cd repositories
git clone <repository-url>

You can clone as many as you want to in to this folder.

To manually set the repositories path, copy config.example.php to config.php. Then change the value of repositoriesPath in the config file relative to the folder where your desired git repositories are located.

Now go to your web browser and go to the URL where you've set everything up.

Disclaimer: the tool has been tested to work on repositories up to 10 000 commits. If your repository have a higher number of commits than that you might experience issues.

Contribute

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the git-pretty-stats repository on Github to start making your changes.
  3. Write test(s) which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request. Make sure to add yourself to CONTRIBUTORS.md.

If there is some certain statistics or graph that you are missing and would like to be added? Create an issue and request it!

Screenshots

For more screenshots visit the project homepage.

Powered by

TODO

  • Cache for large repositories
  • More graphs/statistics
  • Additions / deletions for contributors