Beauty from git logs

I didn’t know — until today — about the existence of Gource. Explained shortly, you can use it to create beautiful animations from the history of git repositories. After installing it, the last couple of hours was spent in watching and recording videos of my projects in git.

The project in this video is called Keywords. It is a demo project I implemented for Software architectures course, implementing a Client/Server app with TCP, session management, client side API to the server and an Android client.

What is interesting to see on the video is how I started the implementation from the Server, then switched to Client, back to Server. Then I implemented a client API for the server as a library (.jar; this is all Java), made modifications to the Client and so on. Every time I needed new functionality:

  • I first implemented the support that on the Server time,
  • then modified the Client API to support that and
  • finally added the support for the feature on the client side.

Basically how incremental development works (may work), doesn’t it?

Installing Gource on macOS was quite simple, with Homebrew:

brew install gource

And then just run it (in some project directory under git):

gource -auto-skip-seconds 1

Most of my projects are ones I work occasionally, some quiet periods in between, so the auto-skip-seconds option is useful to quickly pass these times mostly nothing happened during the project.

Since I had earlier installed ffmpg, it was easy to save the generated animation into a video file:

gource --auto-skip-seconds 1 --title "EasyCrypto demo project (c) Antti Juustila" -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 3 -threads 0 -bf 0 gource.mp4

The saved video files can be quite large, so adjusting the -crf option may be a good idea to make the files smaller. Though that also makes the videos not so cool.

I have one project I started 2013 and have worked upon it until January this year. I already watched the evolution of that system with Gource, and it will make a great video. It would be great with subtitles or voice explaining what happens and why. This would be a nostalgic thing to create: the course I have used that system is something I am leaving behind. This Spring is the last time I will teach the course. The video would be kind of a farewell to the system, since it is unlikely I will continue with it without any useful context, like the course has been.