• News

All About Git Pretty Stats

The raw performance of Git Pretty Stats is very strong when compared to many other tools. New changes, branching, merging, and comparing old versions are all done in a way that makes them faster. The algorithms inside Git Pretty Stats use a lot of information about how real source code file trees are built, how they change over time, and how users get to them.

Git Pretty Stats

You know those cool graphs and statistics that you can get for a repository on github that are so fun to look at? Because of a variety of reasons, not all git repositories are on github, which is a bad thing. This is the PHP tool that you can use to make graphs for your repository. It can be used 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


Install dependencies using Composer.

php composer.phar install

You also need to give permission to the storage folder where you keep your apps.

chmod -R 777 app/storage

To get stats and graphs for the repositories you want, copy them into the folder called "repositories."

cd repositories git clone < repository-url >

You can clone as many as you want into this folder, and you can put them in this one.

Web Server Configuration

  • Apache
  • NginX


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 add to a repository with different e-mail addresses. If you want to, you can change the aliases yourself. When you want to add commits made by user old@email.com to user new@email.com, you can do this. You can add as many as you want.

'emailAliases' => array( 'user_old@email.com' => 'user_new@email.com' );

Upgrade From 0.3 To 0.4

Some changes have been made to the application since 0.4. It now runs on the Laravel framework, and there have been some changes. All you have to do is move your config.php to app/config/local/git-pretty-stats.php if you already have one. You don't have to follow the installation steps again.

If there is a specific graph or statistic that you are looking for but don't see, please let us know. It's time to make a request!

Comments (0 comments)

    Recent Articles

    • Laravel Vs Symfony2 - Is There Really A Difference?

      Laravel Vs Symfony2 - Is There Really A Difference?

      The two frameworks share a lot of things. Laravel also uses most of its third-party libraries from Symfony components, so about 30% of Laravel code is written in Symfony. Symfony, on the other hand, is a more complicated framework that is hard to learn, but it is better for big projects because it is more complicated.

    • How To Get Raw POST Data In Laravel

      How To Get Raw POST Data In Laravel

      Laravel's IlluminateHttpRequest class gives you an object-oriented way to interact with the current HTTP request that your application is handling. You can also get the input, cookies, and files that were sent with the request.

    • Cyclomatic And Npath Complexity Explained

      Cyclomatic And Npath Complexity Explained

      Cyclic complexity and NPath complexity are both measured for a method of a function, just like cyclic complexity. It is the number of ways a given piece of code can be run (ignoring cycles).

    • LeetCode – Essential? Optional? Big Deal Or Not?

      LeetCode – Essential? Optional? Big Deal Or Not?

      Are you a developer aiming to put Facebook or Google (or even both!) on your résumé? There are many ways to improve one’s computer skills. LeetCode offers help in that capacity and even promises to get you employed in giant tech companies.

    • The Depths Of AngularJS's Watches

      The Depths Of AngularJS's Watches

      When you want to watch for changes in AngularJS, it is fairly kind to you by default. The kindness comes from trying to optimize performance for you. This is because each watch expressions will run at least once during each $digest loop. I'll not go into when the $digest loop executes and why, and I'll also use watches in controllers in my examples which you should never do, but that's a whole other discussion.

    • Continuous Integration For Laravel With Jenkins And Git

      Continuous Integration For Laravel With Jenkins And Git

      This will be a hands on guide for setting up automated builds for Laravel using Jenkins. Pretty much that when you do a commit, Jenkins will automagically make a build and in that check code errors and syntax, run unit tests and provide visual code coverage for your code base. Along with other goodies. Jenkins is an open source continuous integration server that has gotten a lot of attention recently as the #1 open source continuous integration server. Mostly because its vast amount of plugins, which currently is 600+ as I’m writing this. We’re going to use 10 of those to automate our test environment.

    • Cyclomatic And NPath Complexity Explained

      Cyclomatic And NPath Complexity Explained

      Cyclomatic And NPath Complexity Explained