I got really frustrated by GitKraken. I’ve been using it for years now both for work and for hobby projects without much to complain about really. Then again I’m not a heavy git user: mostly I just commit and push, only occasionally squashing or cherry picking. I don’t even remember when was the last time I needed a rebase, but it wasn’t yesterday.

However recently GitKraken started having these weird problems with my work repositories. These can get pretty big (by my standards) with tons of branches getting pushed to in parallel (and in the early days some very large blobs got checked in too). Because the branches move really quick it’s important that I can keep my own up to date by merging the head branch back.

The problem is that GitKraken just refuses to fetch repositories. It’s not consistent: sometimes it works, some repos it works, and sometimes it doesn’t. I contacted support about this (since I actually pay for it) and was told that the version of Ubuntu I use (latest, not an LTS like 18.04) isn’t supported so they can’t help. This was quite a letdown since this definitely felt like a git problem, not an OS issue.

Frustration is a great source of inspiration so I started developing my own git GUI instead. The goal is simple: have everything I need for my daily git usage. (Then maybe add other stuff later.) Turns out even the things I use casually are pretty complex under the hood…

I took this opportunity to try to learn some more Rust by using that for Gitegylet (name homage to a famous Hungarian novel). It’s been years since I last wrote an UI in something that’s not HTML (the last time it was GTK from Python) so I had a lot to learn. Iced, a Rust UI framework is pretty straightforward and reasonable, and git2-rs is easy to use (considering what it is) and being under the rust-lang org, trustworthy too.

I got to the point that I could list commits in the main view when I ran into an obstacle that I decided was too much. At that point Iced didn’t have layers which is necessary for context menus and dropdown selects for example. While I really appreciate the library, I wanted to stay focused on making what I want to make instead of trying to contribute to the layer feature (which sounds like a huge endeavor).

So I set out looking for alternatives. It didn’t have to be Rust, so an obvious choice was going with Electron. Electron also has the advantage that I can use ClojureScript to build the UI, which I’ve meant to try for a long time.

That solves the UI problem, but the issue of the native git part remained. I gave nodegit a quick try (it’s what GitKraken uses under the hood too), but it was a trainwreck. The API is barely documented and even what is seems to be auto-generated and hard to follow.

On the other hand I liked working with Rust’s git2-rs, so I gave it a search to see if it’s possible to use Rust from Node. And much to my surprise it is! There is Neon, which allows compiling Rust into native Node libraries. It took playing around with the setup a little to get everything working, but once rolling, the rolling was smooth!

Within a few weeks I already had something that looked like a usable UI with some basic functionality (like checking out branches). I’m learning tons about how git actually works, and using React through ClojureScript is new as well. There’s still way (and tons of features) to go of course, but it’s a good start!