Adventures with Git History and File Tree Structure

Adventures with Git History and File Tree Structure

- 2 mins

Git! It’s everyone’s favorite version control system and rightfully so, it is a pretty powerful tool. Sometimes git can be a little boring and not present the easiest format of data for us creative human-types to understand. We will be exploring some tools to jazz up your source control to lean some cool data about your favorite code bases and developers of the past and present.

File Tree Structure and Architecture

Looking at a codebase in your favorite editor might give us a good understanding of the file structure but not much else. It would be great to get a deeper look into the not-so-obvious dependencies between classes, files, and even directories, the real meat and veg of the operation. One data visualization tool that could help us our here is Code Flower

Alt Text
File tree visualization of a Ruby on Rails API


We can see links and dependencies between files and directories as depicted by the gray lines. The more gray lines a file blob has, the more relationships it has to other areas of the codebase. By hovering over the circles, we can see the file names too and lines of code (loc) count. Note the example of everyone’s favorite schema.rb file above.

Another cool feature of this tool is we get a beautiful display of file sizes. Libraries and external packages are expectedly larger but internal files that are out of proportion with their neighboring file friends might be good candidates for a revisit and refactor.

Visit the source code to get some drop dead gorgeous flowers of your favorite projects here: Code Flower

Git and Developer History

Getting a better understanding of the who, what, where, and why of a codebase. Let’s take git blame to a whole new level with a neat little tool called Gource, an animated source control visualization tool.

Here we get an actual video of the history of the commits and commit authors who contributed to the project with some fun facts like when the code was written, what areas of the codebase the developer worked on, and the magnitude of their ownership.

A tool like Gource is especially helpful getting a high level and quick introduction to a new code base and the developers you’re about to work with.

Jacqueline Potts

Jacqueline Potts

Backend Codes, Dog Mom

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora