Git is fantastic version control software created by a pretty good programmer: Linus Torvalds.
WHO IS LINUS TORVALDS?
For the few who don’t know who this person is (I hope they are really very few…), he is the creator of Linux. If we consider that more than half of the web and the majority of smartphones operate thanks to code written by him, we all owe him gratitude for his genius and generosity.
BUT LET’S GET BACK TO GIT!
There are thousands of articles about this software online, but truly understanding what it does for a newbie is not that simple.
I’ll try to explain it easily and quickly.
WHAT IS GIT?
Git is software that allows you to track changes made to a project.
The simplest function is the one that allows you to go back to a previous version of the project you are working on.
Let’s say you’re implementing a feature, perhaps writing a couple of hours of code, but you realize you’ve taken the wrong path. At this point, without version control software, you would have to hit ctrl+z indefinitely to find the exact point you want to return to. And what if, by chance, the cache of your IDE has stalled for some reason, and you find yourself stuck in a point where you can’t go forward or backward?
Even if we were foresighted programmers and had created a backup folder for the software, we would still have to navigate through the file manager, find the folder, rename it, move and delete files, etc…
With Git, you just enter a command, and your project magically returns to how it was before! Fantastic!
It is also possible to keep open different development paths, perhaps testing a feature from one base and another from the same base, and then decide which one is the best, all without creating thousands of folders and subfolders that will surely end up making everything very confusing.
With Git, it is also possible to upload our project online, on GitHub, a wonderful code-sharing platform.
This way, we can download our code from any computer anywhere in the world.
GIT FOR SMALL PROJECTS
Certainly, Git was developed for very large projects, but it is such a fast and simple software (git in the US means idiot…) that it can also be used for small things, to keep track of our work, make small changes, or run tests. Furthermore, the ability to “ship” everything online is very useful in case we need to access the code from a new location!
Git is software that works through the CLI, the command line.
If you are not familiar with this tool, it’s time to start getting used to it. Don’t be scared by the absence of icons, graphics, and a mouse; in reality, it is much faster than the interfaces we have been accustomed to in recent years!
And you are a programmer, right? The mouse is more of an embellishment for the desk; the work is done with ten fingers on the keyboard!!!
There is also a Desktop version of the software, but the classic one works so well that I have never thought of testing it.
If you work on Windows (like me!!!), you can also download Git Bash, a very nice command line created to facilitate Git operations.
Soon, I will write a brief guide on basic Git commands, so you can start using it.
I’m sure you won’t be able to do without it anymore!
Happy coding! Bye!!!