I like to say that I "grew up" using Git GUI applications. When I started using Git, I was a novice programmer, and the Git Command Line Interface infuriated me. These days, I have more respect for the Git CLI, but I would still not recommend it to anyone except the most hard-core UNIX-ish CLI users.

I believe I started out using Mercurial, not Git, at my first job, and I was told to use TortoiseHG, as that's what everyone else was using.

I loved TortoiseHG, back in 2014, I believe it was one of the most polished and bug-free version control tools that existed for windows. (Windows workstations were mandated by my employer at the time).

When I got a new job and switched over to Git, I perused the version control tools available to me, and immediately tried out TortoiseGit. Well, back then, it was pretty much hot garbage all around. Ugly, buggy, it felt like an unfinished novice attempt at porting TortoiseHG to Git. Eventually, I believe I settled on using SourceTree.

SourceTree is nice to use, but it's proprietary and it doesn't support Linux. I used it for a while, but when I switched over to using Linux on my workstation, I had to go on the hunt for Git GUIs again. The first Linux-supporting tool I gravitated towards, GitEye, is also proprietary.

GitEye was immediately familiar to me, because it's basically just Eclipse and Eclipse's Git plugin, EGit, slapped together and re-branded. I had already used both and found them to be adequate, so I stuck with GitEye for a while simply because it was easy and accessible.

I recently re-installed my desktop OS, and so I was re-evaluating what Git GUI I should use. I was looking on the official list on git-scm.com: https://git-scm.com/download/gui/linux

They all looked like they were either proprietary/paid, still in development, too clunky, or too simplistic for my tastes.

But then the idea hit me. If GitEye is just rebranded Eclipse, why don't I cut out the middle man and go straight to the source? Eclipse is not even listed as a Git GUI on git-scm.com, but in my opinion,

Eclipse is the best Free and Libre Open Source Git GUI that runs on Mac, Windows, and Linux

To make things even better, these days the Eclipse installer allows users to perform a minimal install, called "Eclipse Platform" that doesn't contain any of the java IDE stuff or anything else.

First, in case you don't already have java installed, I would recommend installing openjdk. You can download OpenJDK in a pinch from https://adoptopenjdk.net/. It may also be available on your operating system's package manager. For example, on Debian based linux:

sudo apt install openjdk-11-jdk

Once you have have JDK (Java Development Kit) or JRE (Java Runtime Environment) downloaded and installed, just download the Eclipse Oomph installer (It's the first big "Get Eclipse IDE" button on https://www.eclipse.org/downloads/), and then click on Advanced Mode.

Now, scroll down and choose "Eclipse Platform", then click through the rest of the installer with the default settings.

Once you have finished the Oomph installer, you should be able to open Eclipse, but it won't have any git functionality yet.

From there, all you have to do is select Install New Software... under the Help menu:

and then enter the url for the EGit repository:

https://download.eclipse.org/egit/updates/

Select the EGit package and install it.

After that, you can open the Git perspective with Window --> Perspective --> Open Perspective --> Other... and then select Git.

From there, you can customize the layout the way you want by dragging and dropping windows. I settled on a layout where the repo list is on the left, the History panel takes up pretty much the entire screen, and the Commit Staging window is a little pop-out window in the upper right:

To be fair, eclipse is vast and needlessly complex in many ways. It's easy for me to use because I'm familiar with it and I've used it as an IDE before, but I don't think that's necessarily a requirement for using it as a Git tool. Eclipse has a lot of users and a lot of effort behind it, and it has pretty much only gotten better over time. If you prefer control and detail over limitation and simplicity, Eclipse as a Git GUI is definitely the tool for you.

Basic usage patterns

Instead of copying a repository url and pasting it like git clone <ctrl-v>, you would copy the repository url and then click the clone repository button at the top of the repositories list, and when the clone repo wizard opens, the clone URL will be automatically filled in from the clipboard.

Instead of git add ., you would right click on the "Working Tree" under a repository in the repositories list, and choose Add to Index

Instead of git fetch you would right click on your remote under the remotes list and choose "fetch".

You can choose which branches and tags will be pushed/fetched to/from each remote by default by right clicking the "Push" or "Fetch" items under the remote and choosing Configure Push or Configure Fetch

To check out a branch, commit, or tag, you can simply right click on that branch, commit, or tag, either under the branches/tags list for the repository, and choose Checkout:

Or in the history view:

As you can see, there's a bit of a pattern here, typically any action can be carried out by right-clicking on the line-item that action would be associated with.

You can also view diffs associated with an existing commit by selecting the commit and then selecting the files changed in that commit:

In order to inspect your changes before you commit them, you can double-click on each file in the Unstaged Changes or Staged Changes area on the Git Staging pane:

Caveats & extras

  • you may have to click this button to make it display all branches, otherwise it only displays the branch you are currently on.

  • Sometimes the "Add all to index" command will miss newly created files. It will also miss the "create" side of the "create and delete" that is associated with moving a file. If this happens to you, just run git add . in the root directory of the git repository. The Eclipse UI may not update right away, but it will use whatever is in the git index when you commit.

  • If you are using Ubuntu, Eclipse won't come with a working desktop shortcut that you can add to your "Dock" or whatever its called. Here is the .desktop file I used. Note that the paths for Exec and Icon in this file are relative to wherever you installed eclipse.

/usr/share/applications/eclipse.desktop

    [Desktop Entry]
    Name=Eclipse EGit
    GenericName=Git GUI
    Exec=/home/forest/eclipse/ide-latest-released/eclipse/eclipse
    Icon=/home/forest/eclipse/ide-latest-released/eclipse/icon.xpm
    StartupWMClass="Eclipse"
    Terminal=false
    Type=Application

Comments