Twitter github

Managing Git Repositories

I’ve had a few people that have come to me recently asking advice on how to manage Git repositories across teams. Besides the common but limiting setup of using cgit and ssh, there are a few other options that people seem to be not be aware of.


Gitblit is an open-source (under APL 2.0), pure Java stack for managing, viewing and serving Git repositories using JGit under the covers.

It’s very easy to setup if you have Java installed and you get a nice web console for managing Git repositories with metrics and all of that other good stuff you’d expect from a source code management system. If you’re just looking for a system to manage Git repositories for a small team, Gitblit looks like a great option.

SCM Manager

SCM-Manager is an aptly named management system for SCM. It works with Git out of the box but also supports Hg and SVN.

I personally haven’t played around with SCM-Manager but from the bitbucket commit logs, it looks like a pretty active project with a variety of extensions if you say needed to work against an ActiveDirectory server for authentication.

Gerrit Code Review

On top of allowing you to manage your Git repositories at a very deep level (permissions can be set via refspecs), Gerrit has a built-in code review system.

Gerrit is a mature project, used by open source projects such as Android and Eclipse. I highly recommend it if you’re looking for not only a system to manage your Git repositories but a code review system that tightly integrates with Git. It’s nice to note that code review items within Gerrit are Git-related artifacts. You are pushing git commits to Gerrit that can be shared and crafted by your colleagues. I find this to be a distinctive quality over other code review system such as ReviewBoard.

Anything else that I missed that people use out there?

  • Mike Henke

    Gerrit seems very cool especially with Mylyn integration, but it is a pain to setup on windows. I have been trying to get gerrit going off and on for several months on a windows, git, and trac setup.

  • Alex Blewitt

    I wrote about setting up Git, Gerrit and Jenkins at InfoQ:

    It works OK on Windows, but you need to use OpenSSL 5+ in order to generate keys (as well as having them somewhere the SSH clients can use it).

  • Guillaume Belrose

    Both scm-manager and gitblit are a good step beyond using Apache with the GitWeb and git-http-backend cgi scripts.

    I would say that gitblit has a slight edge in its UI. You can navigate within the repository hierarchy quite easily. The version of scm-manager I’ve tried is Ajax-based but does not handle the browser back button and history very well.