git ready

learn git one commit at a time
by Nick Quaranto

visualizing your repo

committed 13 Jan 2009

So, you want to see your repository in a brand new way. You’re sick of the command line, you need to see some graphs! Pixels! Buttons! Graphics! Dialog boxes! Ok, we get the point.

Our first option is viewing your repo in a browser. This functionality is packaged with most git installs:

git instaweb

This will fire up a server, usually lighttpd, to serve a simple web interface for your repository. You can browse commits, trees, view files, what have you.

This is really useful if you need to dive down and see history but you don’t know the commands yet. (And it’s easier too.) If you don’t have lighttpd installed and don’t want to bother with it, running

git instaweb --httpd webrick

will force WEBrick to serve the page, which will work just as well if Ruby is installed on your system. It also works with Apache, just check instaweb’s manpage to see the supported server and other goodies.

Webpages are great and all, but what if you want to see your commits in a more…graphical manner? Look no further than gitk or gitx then. These programs give you a more dynamic view of your repository and let you actually see branches and merges take place:

Need some graphical git loving? Use gitk with most git installs by running gitk or download gitx for OSX. Windows users, if you know of an equivalent, comment away!

There’s also plenty of git graphical love over at GitHub for every project, be it visualizing the impact individuals have had on the project, times that people have worked on the project, and even more. Definitely play around with various graphs they have to offer if you haven’t yet.

There’s also plenty of other good visualizers over at the GitWiki. If you know of any other good ways to see your repository graphically, let us know in the comments. I’ll continue to update the post with more and better knowledge as it becomes available.