Learning Git isn’t about memorizing commands. It’s about understanding version control. I suggest using a graphical user interface (GUI) instead of a command line interface (CLI) to do that.
The idea that using the command line exclusively makes you a better developer, or worse, a real developer™ , is misleading for newbies and even for more experienced developers. I’ve seen people from all levels carry this assumption, and I’ve seen this assumption limit the developer’s abilities every time.
Such a thought, when religiously adhered to by developers, is limiting their ability to do great work, to seek the best solution to the problem and to avoid basic mistakes. This can be adapted to any other area where developers tend to become zealous, but in my experience, Git and version control has been a good example.
That’s because there are amazing GUI tools for Git. I personally use GitKraken but any Git client with the same features would do the trick.
The main difference between the command line and a GUI is usability. Let’s examine using screenshots.
Here’s the interface when you use autocompletion on the command line. A list of all possible Git commands. Not so user friendly.
What ends up happening is that, rather than learning Git concepts, you end up memorizing specific commands and stay at the most basic level. Pull, push, branch, add, commit. That’s pretty much it.
But Git is more powerful than that. The issue with the command line is that you don’t see what’s available.
That “Fix typo” commit could have been squashed with the previous one before pushing. That “Saving changes” commit is cluttering the git history and is meaningless to anybody else but you at that exact point in time (try remembering what that commit was about a month later). Stashing your work in progress is what you’re most likely trying to do.
Here’s the difference when using a Git GUI with an intuitive interface. What’s interesting is that only relevant commands are displayed. And the interface adapts to your actions. It shows you what commands are available for a specific commit, or for a list of commits, or for a single file, or for many files… you get the idea.
What’s more is that it even makes you a better CLI Git user. Why? Because a GUI like GitKraken doesn’t hide anything from you. The command names are the same as the CLI. Not only will you learn Git concepts but you’ll learn the commands.
I won’t go on about what the GUI can do so if you want to know more, check out GitKraken’s feature page.
The purpose of this post was to show you that dogmatism in software development rarely leads to effectiveness and efficiency and to point out that what’s most important is to understand what you’re doing before trying to memorize how to do it.
If you want to start using GitKraken, feel free to use my invite link.