Git is one of the Version Control Systems that have appeared over the time to make developers life easier. It's the last to arrive, although its youth in this case is a pro rather than a con. It has had the opportunity to meet deficiencies and defects of his predecessors (Subversion mainly) and it has come just to make the tasks that were once complex now ridiculously easy. By the way, this is another great project of a guy known as Linus Torvalds, maybe you've heard of him. :-P
Git is a free project, you can find the source code at GitHub to consult or to learn; most used programming language is C, so if you are interested in how people who most dominates this language write his code is a good idea to keep an eye on the repository.
What is a Version Control System?
We mentioned at the beginning of this article version control system but we don't have to give for known things maybe someone doesn't know, so what is a version control system? For us, as developers, mainly a way to keep track of the changes that we have been doing and be able to go back easily when something that we coded doesn't work as expected. We have to forget to remember how it was some part of the code when everything worked properly, and also forget to be commenting portions of code which then never removed and left there to remember in a sort of Horror Museum with code that no one knows what was doing or why it's there.
But that is not the only one of its virtues: a VCS also allows us to work in parallel (in Git thanks to the use of branches) in different versions of our application; on the one hand, because we don't know how to deal with a change, and we want to try different ways to finally see what is more efficient and discard others; on the other hand, because we are working at the same time (one or more than one person) in different parts of the project and that some portions of code modifications do not have why affect nor interrupt the rest of development… Basically, be able to auto-merge in many cases those changes and get everything under control.
Why Git rocks?
The main difference between Git and Subversion is that Git works at local. Subversion sent information of each change in the code to a server, which is who was keeping the timeline of your modifications. Git does this process on our own computer, whenever you use Git the answer is immediate because it doesn't depend on an internet connection… It's also the concept of the remotes (to add servers such as GitHub or GitLab… but also some less known as a coworker server or the server of our company) that we will see in depth later, but they're not needed in any case, just give us a window of our code and in some cases, through some configurations, extra services like Travis CI at GitHub, that is used to run our test battery every time we send a change so that we know if that change has passed the test or has broken something, this is a simple way to automate the test that everyone should have on each of the projects we do.
The non-dependence of an internet connection is something that is greatly appreciated, especially if at some point you've used a version control system that practically can do nothing if you don't have access to the server that houses all your information with all of your saved changes. If we are working as a team, we can work anywhere and simply require an internet connection when we want all the changes to be sent to a remote server to let others know what we've changed, or if you work on a personal project does not require internet connection for nothing… Oh, how wonderful is this!
We hope that you've been wanting to learn more about Git and that you are aware of upcoming publications, because in next chapters of this series we will learn how to install Git and we will discover major Git commands, how to use Git in a proper way, and if you want to go a step further to master Git we will review some of the most widely used conventions to make our experience with this version control system a success.
Never stop coding!
Top comments (0)