tig vs. gitkraken: Comparing git User-Interfaces

credit to atlassian.com

Working with git on a day to day job

When working with git, it’s not uncommon to see something like the following in the user’s file.

And so on.

And to consider another use case, it might have happened to you that you needed to stage some specific lines of a file or even a single line for that matter. I have dozens of similar experiences when I’m trying to include all the relevant changes in a single commit with a good commit message.

Why does git need a user-interface?

This may not be much of a trouble at first, but when your repository gets bigger and bigger it becomes daunting, especially when you have a lot of “changes not staged for commit”.

That being said, I consider my alternatives. Which brings us to the necessity of a user-interface for .

What options do we have?

There are a lot of options and here’s a list to name a few. But I don’t think we need to get our hands on every single one of those. I have experiences with 2 of them, & I’m gonna share it with you.

gitkraken

Very cool design and an elegant layout, with lots of features.

You can expect to get the most out of once you experience this Graphical User Interface as depicted below.

A screenshot of my project in gitkraken
Reviewing changes from previous commits.

I admit that I was reluctant to give it a shot when one of my managers recommended it. But after spinning it a few times here and there, I wasn’t willing to let go.

You get lots of flexibility regarding how you want to do what you want to do (version source control speaking).

If you want to add/stage a single line in a whole file, you got it. If you want to add a hunk, you still got it. And these are not all. It comes with lots of features and it is also free to some extent.

Another screenshot of my project, which enables me to stage single lines or by a hunk.
Fantastic diff view when a conflict occurs.

Pros

  • Flexibility to stage a file as you wish. Either staging a single line, by hunks or the whole file.
  • Awesome diff view when a conflict occurs.
  • Beautiful tree view when viewing the logs.
  • It is free for the general use case.
  • It is full-featured for a git client and growing by the day.
  • It updates regularly and notifies about the latest features and bugfixes.

Cons

  • It consumes a lot of memory.
  • It doesn’t fit well when working on a directory mounted from . Changes are not tracked well enough and even committing often leads to lagging. Especially if you don’t have a stable connection.
  • Regular updates were a pain for me as I was satisfied with the current features and I couldn’t turn it off.
  • I’ve had some crash experience when the git working tree gets bigger and bigger and it was one of those ugly C programming language “core dumped” that was irritating.
  • It doesn’t allow one to use the application beyond 10 days unless you log in before the period ends.
  • It requires way too much access when trying to login via Github as depicted in the picture below.
gitkraken requires way too much access.

I am glad to be introduced to such a great tool & I would recommend checking them out.

tig

This little fellow has been around since 2006.

Screenshot from my terminal after pulling from tig.

Although it didn’t release its first stable version until 2012.

But aside from all that history lesson, here’s what you would expect to see when using .

A screenshot of my terminal while on tmux

As you can see from the above picture, shows the tree similar to what you would expect from.

It’s the desired/preferred way when you’re looking at a project.

It is also very fast as it is written in the C programming language. I would use instead of gitkraken in one of the following two scenarios.

  1. I am low on memory and I don’t want to add another burden to my OS by opening another high-consumption load.
  2. I am on a remote host and opening a graphical application is not an option. Not unless some other approaches are considered.

When working with it, here are a couple of hotkeys you might use a lot.

  1. to show in the current working tree.
  2. to stage/unstage either a hunk or a file, depending on where your cursor is. Note that is not able to stage a single line the way gitkraken does.
  3. to commit the staged files. Which opens your favorite editor that you specified in environmental variable.
  4. to refresh the working tree after a change has occurred since you opened . It doesn’t refresh itself automatically after opening.
  5. to quit or to return to the last window.
  6. to show the list of hotkeys.
  7. and to navigate through a file.
  8. and to search forward and backward just like in command.

To sum it up here’s what you can expect from using .

Pros

  • It is super fast, just as you would expect from a git client.
  • It is simple and no fancy work or configuration is needed.
  • Hotkeys are simple and intuitive and you wouldn’t need a lot of time memorizing them.
  • Everything is clear and concise, as well as elegant.

Cons

  • Some of the features of a usual git use case is missing. e.g. backward or to a [new] branch.
  • You can’t stage a single line as you can in gitkraken.
  • Sometimes I get lost when working with hotkeys.
  • You don’t get to change anything once you’re in the editor after invoking the commit command. Staging or unstaging more files is not an option when you’re inside the editor after pressing .

Conclusion

In the end it’s up to you to decide which user interface to use, if at all. But for my experience, I’d choose gitkraken unless there’s a memory shortage or graphical limitation.

But both of these tools are amazing and I strongly suggest you check them out. Once you get a taste of them, it’d be hard to live without them.

Acknowledgment

I sincerely appreciate the time you put into reading this piece. I hope you get something from it as you invested the most precious asset of yours: time.

Stay tuned and follow me if you enjoyed the above content and feel free to check out my other contents if it pleases you.

Backend Developer | DevOps Engineer | A Cool Mentor | Linkedin: https://linkedin.com/in/meysamazad