Visualize Git with SeeGit

git, github, code 0 comments suggest edit

I recently gave my first talk on Git and GitHub to the Dot Net Startup Group about Git and GitHub. I was a little nervous about how I would present Git. At its core, Git is based on a simple structure, but that simplicity is easily lost when you start digging into the myriad of confusing command switches.

I wanted a visual aid that showed off the structure of a git repository in real time while I issued commands against the repository. So I hacked one together in a couple afternoons. SeeGit is an open source instructive visual aid for teaching people about git. Point it to a directory and start issuing git commands, and it automatically updates itself with a nice graph of the git repository.


During my talk, I docked SeeGit to the right and my Console2 prompt to the left so they were side by side. As I issued git commands, the graph came alive and illustrated changes to my repository. It updates itself when new commits occur, when you switch branches, and when you merge commits.

It doesn’t handle rebases well yet due to a bug, but I’m hoping to add that as well as a lot of other useful features that make it clear what’s going on.

Part of the reason I was able to write a useful, albeit buggy, tool so quickly was due to the fantastic packages available on NuGet such as LibGit2Sharp, GraphSharp, and QuickGraph among others. Installing those got me up and running in no time.

I hope to add a nice visual illustration of a rebase soon as well as the ability to toggle the display of unreachable commits. I hope to use this in many future talks as a nice way of teaching git. Who knows, it might become useful in its own right as a tool for developers using Git on real repositories.

But it’s not quite there yet. If you would like to contribute, I would love to have some help. And let me know if you make use of this!

If you want to try it out and don’t want to deal with downloading the source and compiling it, I put together a zip package with the application. I’ve only tested it on Windows 7 so it might break if you run on XP.

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.



25 responses

  1. Avatar for Daniel Marbach
    Daniel Marbach March 15th, 2012

    Hy phil
    Looks nice. Why didn't you use gource for example? Although I admit your tool looks much cleaner!

  2. Avatar for Andrew Tobin
    Andrew Tobin March 15th, 2012

    Ha! This was one of the ideas someone submitted to us to do as a Code 52 project, and we hadn't gotten that far down the list yet - I was just pointing it out to the guys in the room yesterday (I stumbled across it checking out some of the Githubbers on Coderwall).
    Looks great, and thanks for pointing out the Graph nugets - I've never done that sort of visualisation with WPF, and I was interested in seeing how it was done.

  3. Avatar for Maciej Aniserowicz
    Maciej Aniserowicz March 15th, 2012

    Cool, i will be talking about git myself next week, this might come handy. Thanks!

  4. Avatar for Brian
    Brian March 15th, 2012

    The SeeGitApp.exe in the zip file crashes when I try to run it.

  5. Avatar for Markus Olsson
    Markus Olsson March 15th, 2012

    Okay, this is eerie! I've built something _very_ similar:
    I'd like to say great minds think alike but I'm no where near self confident enough for that sort of comparison :)
    I'm pushing my code up to in a minute. See if there's anything you can make use of. I do have some ideas for more features though. Maybe we should collaborate?

  6. Avatar for Bernhard
    Bernhard March 15th, 2012

    @Markus That is freakishly similar. I think I prefer your display of comments inside the commit and I prefer Phil's display of labels. A collaboration here would be nice to see. Can you fork Phil's repo and make those changes then submit a pull request?
    This is a great resource for explaining (and understanding) Git repos.
    Just ran the exe from the zip on WindowsXP and it threw because:
    {"Could not load file or assembly 'GraphSharp.Controls, Version=1.0.4115.29430, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.":"GraphSharp.Controls, Version=1.0.4115.29430, Culture=neutral, PublicKeyToken=null"}
    Damned corporate WinXP operating system. ;)

  7. Avatar for Markus Olsson
    Markus Olsson March 15th, 2012

    I pushed my raw TODO list up there as well, hopefully there's something of value there.
    One of the more ambitious ideas I had was to keep a copy of every displayed graph (effectively every repo update) so that you could step back and forth whilst demoing.
    Rebases seems to take a while to get a grasp of so with this you could do the rebase, at which point the viewer show the after-the-fact graph and then you could use arrow keys or a slider to toggle between the before- and after graph.
    Oh, and PS. Very nicely done Phil! I yield :) DS

  8. Avatar for Evil Kiru
    Evil Kiru March 15th, 2012

    SeeGetApp.exe stops working when I run it on Windows Vista Ultimate x64 SP2, even after going to properties and clicking Unblock. I have the following installed: Visual Studio 2008 Professional, VS 6 Enterprise, Microsoft Windows SDK for VS 2008, Microsoft XNA Framework Redistributable 4, Microsoft .NET Framework 4 extended, 4 client profile, 3.5 sp1, compact framework 3.5, compact framwork 2.0 sp2, and a bunch of different VC++ 2008 and 2005 redistributables.

  9. Avatar for Ignacio Calvo
    Ignacio Calvo March 15th, 2012

    I've been remembered of the fantastic graphical displays of Plastic SCM, an impressive Spanish DVCS I've been using for a while. It is a .NET development.

  10. Avatar for Seth
    Seth March 15th, 2012

    Trying to get it running on XP works, almost:
    - add graphsharp dlls to same folder (from
    - unzip Windows API Codepack (from, add `binaries/*.dll` to the GAC
    Here, ominously, one dll failed:
    > gacutil /i Microsoft.WindowsAPICodePack.ShellExtensions.dll
    Failure adding assembly to the cache: This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
    It is precisely because of this, that we can (probably) **everything** except ... browse for a project. @Phil, could you make it use the command line argument or current working directory?

  11. Avatar for Steven Harman
    Steven Harman March 15th, 2012

    Yeah, but does it run on UNIX? :)

  12. Avatar for haacked
    haacked March 15th, 2012

    Hi all, I forgot to include the assemblies in the zip file. I fixed that. I need to ILMerge all of it together.
    @Steven, I haven't tested it on mono yet. Send a pull request?

  13. Avatar for haacked
    haacked March 15th, 2012

    @Seth log an issue. I have some fallback code we can add to use the OLD file browser dialog. Or better yet, send a pull request since I can't test it. :)

  14. Avatar for haacked
    haacked March 15th, 2012

    @Markuss great minds do think alike. And so do ours! I'll take a look later. Would love to collaborate. :)

  15. Avatar for Brian
    Brian March 15th, 2012

    Works now that the assemblies are inside the zip. I thought it looked a bit thin the first time. =) App looks great.

  16. Avatar for Bundermuft
    Bundermuft March 15th, 2012

    Any decent size repository will take ages (minutes to tens of minutes) to open. A visual indicator that the software is doing something would be first thing do add. Otherwise nobody knows is the thing crashed or what.

  17. Avatar for Eirik M
    Eirik M March 15th, 2012

    Phil, is this a WPF or a Silverlight application. After pulling the source from github, opening it in VS2010 and trying to compile I get the (dreaded)
    "Error2Unknown build error, 'Cannot resolve dependency to assembly 'System.Windows, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.' SeeGitApp"
    compiler error.
    System.Windows.dll is a SL assembly while your SeeGit project refers to the PresentationCore and PresentationFramework assemblies used by WPF. In the code however, there's lots of references to System.Windows.
    So which is it; SL or WPF? :-)

  18. Avatar for haacked
    haacked March 16th, 2012

    It's a WPF app.

  19. Avatar for Mark Heath
    Mark Heath March 16th, 2012

    Typical, I've been building the exact same app myself for a talk I'm giving on DVCS next month :). Yours looks much nicer than min though, and I'll have to check out GraphSharp's layout algorihms, as my own layout algorithm is very poor. I might even contribute Mercurial support as my app can do that.
    There does seem to be a performance issue with the latest version. The graph for Code52/carnac took forever to load, and was impossible to zoom.
    Still, very excited by this project

  20. Avatar for Eirik M
    Eirik M March 18th, 2012

    FWIW. Installing the Expression Blend SDK fixed the "'Cannot resolve dependency to assembly 'System.Windows,...." error.

  21. Avatar for HCN
    HCN March 22nd, 2012

    Any chance we can get a video of the talk?

  22. Avatar for Matt
    Matt March 24th, 2012

    this is awesome! you should make a webcast on intro to Git! i'm a subversion guy and really want to learn git, but i can never make it through all the guides.

  23. Avatar for Marc
    Marc May 10th, 2012

    Phil, I was curious if you or another 'git-hubber' wouldn't mind doing a screen cast of a visual studio workflow with git. I know I can't be the only one that would be curious to watch someone with more experience slip in and out of the git/visual studio workflow.

  24. Avatar for hutj
    hutj October 17th, 2012

    Hi,I think the seegit is amazing.I like this reveal "what's going on there "idea. Thank you for your work.
    I download the zip package with the application,but i run the SeeGitApp.exe in 32bit win7 with an error :
    Problem Event Name:CLR20r3
    Problem Signature 01:seegitapp.exe
    ... ...
    Problem Signature 04:LibGit2Sharp
    ... ...
    Problem Signature 09:System.DllNotFoundException
    I thought this means it could not find the libgit2sharp.dll,but it indeed exist in the same folder with SeeGitApp.exe
    what should i do .Thank you very much.

  25. Avatar for haacked
    haacked October 18th, 2012

    Please log a bug in the GitHub repo with details. Thanks!