Stop Using the Git CLI

Drop the Git GUI stigma, learn more about Git, and never accidentally push to master again

Steven Popovich
Feb 13 · 4 min read
Image for post
Image for post
Photo by Florian Krumm on Unsplash.

If you are a developer, you probably use Git. If you don’t, I hope you are using some sort of source control!

If you are using Git, you are either using the CLI or a GUI that wraps the functionality. Using a good GUI is better.

Oh, My Eyes…

The first main advantage of using a GUI is that you are getting a Graphical User Interface — an actual UI tailored to you, the developer. Developers have written this program to help other developers do their jobs. I cannot overstate this. As soon as you get the hang of using a GUI, you will be able to look at your codebase in a completely different manner.

And thus I will introduce my preferred Git GUI, GitKraken:

Image for post
Image for post
GIF from GitKraken Support.

If you have been working with Git for a while, I hope this will please your eyes. You can instantly and easily see every commit from everyone in your codebase. View remote branches, merges, and tags.

This is more than pretty. With this view, you can easily see changes. This means you can easily see breaking changes (e.g. to your master branch).

This has affected my performance at work. At my company, all merges to master spin off a new build of our application. Suddenly, we stopped getting builds. QA posted this on a public channel. I was able to go to the last tag where we did have a working build and then click through each commit, line by line, very quickly. Spotting the breaking change was then trivial. I opened a quick PR to fix it and had my five minutes of fame. But it was all due to GitKraken!

Don’t Mess Up Your Commands

I also spend no time typing in branch names or remembering Git commands — or misremembering them!

Another advantage of GUI is that it is far less error-prone. You can more easily see what branch you are on as well as see what is committed or not committed. You will be much less likely to accidentally push to master! I know it can be fun to slam through some commands in the CLI, but every time you are typing, you can make an error or forget what branch you are on.

Learn More About Your Tools

Speaking of Git, when was the last time you actually went and read the documentation or learned something new about Git? I almost never have. I still learn things, though… just through the use of GitKraken. For example, just right-click on a commit:

Image for post
Image for post
Right-clicking on a commit.

Do you know what every single option does here? Did you know that Git can do all that? Git is an extremely powerful tool with a lot of ways to use it. But when you use the CLI, you learn the few commands that get you by (commit, push, branch) while not knowing what Git truly has to offer.

Or maybe the subtleties of Git are not so clear:

Image for post
Image for post
What is the difference between these four options?

The UI shows you the different ways of getting code from the remote repo. From here, you can easily google the different types of pulls. I wouldn’t have known that these existed! If you are curious, take a look at the documentation.

After really learning how Git works, I can now cherry-pick, make demo branches, merge between them, and more easily parallelize my work without fear of messing things up.

The Stigma

Hopefully, you feel some inclination to use a Git GUI. If you have read this far, you probably are open to switching, but many people are not. For some reason, there is a stigma against using a Git GUI. It is not “cool.” We all want to feel like next-level hackers, and let’s be honest, that’s part of the reason we are in this line of work.

But this is not a valid reason to limit yourself. It is almost akin to sticking to an older programming language just because you feel comfortable with it. Good engineers don’t do this!

I think people also look down upon GUI usage and view it is a crutch. Pros use the CLI. Well, professionals don’t make errors and that is arguably the biggest upside to a GUI.

In some ways, getting better at Git is even more important than learning new languages because source control is a skill used in all development — regardless of language.

Don’t feel peer pressure or reinforce these stigmas. It is OK to use a GUI and it is OK to use the CLI. Just admit you like the CLI because it’s fun.

Thanks for reading!

Better Programming

Advice for programmers.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store