DEV Community

Cover image for Why you should use GIT in the bash (and not a GUI)
joao-gouveia
joao-gouveia

Posted on

Why you should use GIT in the bash (and not a GUI)

When I was in college, I was introduced to the concept of GIT. A place where you could share your code with your group mates instead of sending code through Facebook (yes, I used to do that).
It was love at first sight!

I began using it by means of a GUI. I don't remember exactly which one it was (maybe SourceTree or Kraken).
In a group project, we would use a single branch and push the new code when we finished some new functionality. I did not really understand the concept of multiple branches, pull requests, rebases, etc. Every time there was a merge conflict, no one really knew what to do. We would panic and sometimes delete everything and start over.

Alt Text

We knew how to use a couple of functionalities of a GIT GUI.

But we did not know GIT.

We didn't know how it worked under the hood. And I believe that in GIT that is paramount.

GIT is a fairly complex tool. Its not easy to understand the branching system, how to merge and solve conflicts, rebase your code with some missing commits, among other important possible flows. In order to do that, it is necessary to read and study a little bit.

In my opinion, a GUI is great in abstracting all that complexity (especially for beginners), but without using the bash and running the commands yourself, you will never break that barrier into the land of really understanding what is happening in your repository.

I only figured out GIT once I started googling the problems I had and saw all the branch schemes, weird git commands and their explanations.

A GUI will not force you to progress in your GIT knowledge since you can only do so much with it.

So if you are willing to make the switch and start using the bash to use GIT, here is another post with some useful commands to get you on the right track (https://dev.to/duomly/git-cheatsheet-for-beginners-5apl).

TLDR:
It can be a bit overwhelming at first when you start messing with the commands to add files, commit and push to the remote branches, fix merge conflicts, etc. A GUI is great in abstracting all that GIT complexity but if you want to be a GIT wizard, use the bash. That is it.

Top comments (2)

Collapse
 
dakujem profile image
Andrej Rypo

Hello, I agree with you that knowing the commands is essential.

From my experience though, I actually learned Git branching, rebasing and all that more complex stuff, by observing what the GUI did.
Yes, you still need to learn the documentation yourself and try it out in the CLI, but Git really was overwhelming at first and the GUI really helped me a lot to visualize what on Earth was going on.

Now I'm still using a GUI, for productivity. Solving a merge conflict in Vim/CLI? Massacre. Doing rebase and squash on a branch with 50+ commits? Sorry, nope.

Collapse
 
joaogouveia profile image
joao-gouveia

Yes, I do agree that a GUI helps in observing changes in files. rebases among other things. I often use the GIT GUI the IDE brings (VS code or other) in order to do that.