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.
- 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
- PHP >= 5.3
- Git
Start by clone this repository and setup your web server. Take a look at the great repository laravel-website-configs by Dayle Rees for Laravel web server configurations.
Install dependencies using Composer
php composer.phar install
You also need to set permission to the applications storage folder
chmod -R 777 app/storage
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 override configuration, start by copying app/config/git-pretty-stats.php
to app/config/local/git-pretty-stats.php
. Then you can configure the following in that file:
Custom directory for repositories
Set the repositoriesPath
to a relative path where you store your repositories
'repositoriesPath' => '../../repositories'
Specify each repository path
Set the repositoriesPath
to an array of paths. They can be either relative or absolute.
'repositoriesPath' => array(
'/var/www/web-project',
'../test-project'
);
E-mail aliases
Sometimes a user will contribute using different e-mail addresses to a repository. If you want to you can manually map the aliases for this. To add commits to [email protected]
made by [email protected]
you can do this (you can add as many as you like):
'emailAliases' => array(
'[email protected]' => '[email protected]'
);
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.
Since 0.4
the application is based on the Laravel framework and some changes have been made. All you need to do (except following the installation instructions again) is to move your config.php
to app/config/local/git-pretty-stats.php
if you have one.
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
- Fork the git-pretty-stats repository on Github to start making your changes.
- Write test(s) which shows that the bug was fixed or that the feature works as expected.
- Send a pull request to the develop branch. 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!
For more screenshots visit the project homepage.
- Cache for large repositories
- More graphs/statistics
- Additions / deletions for contributors