So, you’re looking to explore your repository in a whole new light. Tired of the command line, you crave graphs, pixels, buttons, and graphics. Well, you’re in luck because there are several options available to visualize your repository.
First up, let’s talk about viewing your repository in a browser. Most Git installations come with a neat feature for this:
git instaweb
This command sets up a server, typically using lighttpd, to provide a simple web interface for your repository. You can browse through commits, trees, and view files effortlessly.
This is especially handy if you need to delve into the history but haven’t mastered the command-line yet. And if you don’t have lighttpd installed or prefer not to use it, you can opt for:
git instaweb --httpd webrick
This forces WEBrick to serve the page, which works just as well if Ruby is installed on your system. It also supports Apache; just refer to the instaweb’s manpage for details.
But what if you want to visualize your commits in a more graphical manner? Enter gitk or gitx. These tools provide a dynamic view of your repository, allowing you to see branches and merges in action:
If you’re craving some graphical Git goodness, you can use gitk with most Git installations by simply running gitk, or you can download gitx for OSX. Windows users, if you know of an equivalent tool, feel free to share it in the comments!
Furthermore, GitHub offers a plethora of graphical representations for every project. You can visualize the impact individuals have had on the project, track times when people worked on it, and much more. Make sure to explore the various graphs they have to offer.
For even more visualization options, you can check out the GitWiki, which lists several other useful visualizers. If you have any other great ways to visualize your repository graphically, share them with us in the comments. I’ll keep updating this post with new and improved techniques as they become available.