Introduction to Git

Parte 1

Git  is a version control software (CVS) created in 2005 by Linus Torvalds, the same creator of Linux, developed under an Open Source license and free to use, this tool was developed to manage large or small projects with efficiency and greater access speed, providing a broader list of benefits and conveniences.

One of the great advantages of using  Git is that it facilitates access to our project. One of its main functions is to be able to modify, delete, implement data or information collectively and/or remotely. In other words, with  Git  we can make copies of repositories (file deposits) of our site or any web project and continue the implementation or improve the functions locally or remotely without affecting its original state unless this order is given.

Let's look at a practical example of using  Git  in certain circumstances:

Pablo, Esteban and Estefany live in Spain and are developing a Drupal site.

One day Pablo had to travel to Peru for 3 months to a development training, likewise Estefany had to travel to Colombia for 2 months to train junior developers and Esteban stayed in Spain in charge of the project believing that he would not be able to continue the process alone; they all made the decision to implement  Git , so Pablo from Peru, at night dedicated himself to adding more functions from his copy generated with  Git , likewise Estefany, when she finished her training in Colombia, helped solve the site errors in her own copy; the best of all this was that they did it as a team and remotely, without altering their times or stopping development.

But what would happen if Pablo made a mistake and deleted a file in his copy that keeps the site running stable? In reality nothing would happen, since the changes made to the copy are not made directly to the original project until Git is told   to save the changes.

Another favorable point is that the changes made by Pablo do not conflict with the changes made by Estefany, this will prevent possible incompatibilities between the changes made by any of the 3; That is, when Pablo made a change to a file and at the same time Estefany worked on the same file making some small modifications,  Git came into play , in this case it compared the changes made by both and unified them, avoiding conflicts between the data added by someone. of the 3.

If at some point the project were to fail,  Git  has the ability to restore to a point before a change was made, a feature that greatly benefits the development and implementation of the site since if it stopped working due to a change, it can be restored to the point where it was working previously. A more accurate description would be, every time we make a change with  Git  we take a snapshot of the modified file(s), in this way when we want to undo a change to our project, the only thing we have to do is restore it to the point where  Git  took the snapshot of the file(s) and start over.

Concluding this idea,  Git  contributes greatly to the expansion of our project, due to its popularity it is becoming the CVS, most used in the development of websites, for this reason the use of  Git  will be a quite big benefit in addition to increasing productivity.

The invitation in this case is to implement  Git  in our projects to improve quality and innovate using new development techniques.

By: Cesar Duran

Drupal Jr Developer

Seed EM