I have to admit that when I was learning to code and my coach came with the term “control version”, it took a while until I grasped what he meant by that. Git came to my early life as a developer, and since that very moment, it is not very easy to get rid of it.
But what is Git and what is meant by control version? Well, the easiest way to describe it is like you have a very accurate record of your project at any time, and not only local -at your computer- but also remote -on services like GitHub or GitLab.
So for example, let’s say you create a project from scratch, let’s say you are creating your portfolio page, and you are keeping a record of every single (important) step you are making. This way you can accomplish several things: you can always take a look where you are, where you began, what you have done so far, share your code, import your code, etc.
Git is much more than that but I think that it a very good definition to start with!
Once we understand the term control version, we should jump onto the “branches” culture.
We like working in a relatively organised way, right? In order to do it properly, developers work with branches. Let’s say you have your main branch, normally called master. The easiest approach could be to have in this branch the best and most recent version of our project. Imagine you create a branch called footer and then you create the footer and when you are done, you say: footer branch should be included in my main branch. This process is called merge.
Why is this approach so cool? Because you can ask your friend Mario to create for example the header branch, your friend Luigi to create the main section branch, while you take care of your precious footer. And at the end of the day every one merges its branch into master.
This is also a very easy way to have a classical git merge conflict! But since this article was meant to talk about happy things, git conflicts will be addressed in another article.
All in all, Git is really cool, there are a couple of tutorials that are worth watching and will fast increase your value as a developer while you learn to master it.
Ah, and if you messed it up a lot with Git, there is one page you should know: https://ohshitgit.com/
That’s all for today!
Top comments (0)