back

Version Control – Git

by Anonymous for Technology 9 Comments
Version Control – Git

As described in the previous article, version control can be very helpful during the development of an application. One of the most popular version control software is Git. In this post we will try to explain the usefulness of Git and describe how it can aid the development process.

Before starting to experiment the amazing features of git, let’s imagine a situation. Let’s assume, that we have a team consisting of 3 developers, a team leader and a quality assurance engineer. The daily routine of the development team is as follows:

  • Each developer works on a separate task
  • The team lead reviews the code, checks for errors or inconsistency and approves the developers work
  • QA engineer tests the application and reports if any bugs are spotted

This is a common scenario for most of development teams and studios. Now a question arises: how to make sure, that after a developer finishes the task, it will work exactly as it is supposed to for the other developers, and how to keep track of changes from other developers? For this common situation, there is a common strategy with Git.

First of all, it’s important to understand how Git works. Git software needs to be installed for each developer locally: there are installation packages for all popular operating systems, and it’s a casual procedure of installing. In order to “share” the code between the developers, there needs to be an online server, which will allow viewing and browsing of the project codes. For that, there are open-source packages that can be installed on the private servers, or You could use a third-party services, that are giving You it already configured, which are called Git hostings. Most popular Git hostings are Github, BitBucket and GitLab. As for development environment, the code copy that resides on the developers’ computer is called local and the online copy, which is accessible by all the team members, is called remote.

So now that we understand the local / remote thing let’s get back to our imaginary team, which must have already done some tasks. So let’s say that all three developers have completed their assigned tasks, and want the team lead to check their work. In order for this to be possible (with the least hassle possible), they need to create a “snapshot” of their work, that will indicate who has done the changes. when the changes were done and what is this “snapshot” all about. For this,  the developer writes a title and description for the changes made, and commits it. Commit is the term used to indicate the specific snapshot” in the history of the changes. After the developers have commited the changes, they need to “upload” their work to the online / remote. This process is called pushing. 

But You may ask Yourself: “Okay, I pushed my changes, but how will I have the changes that made the other developer, so I will not have to do re-do the same thing for myself… To space with this, better grab a flash drive to copy those changes…”. 

Git wouldn’t be Git if it did not give a solution from this, so please, put back the flash drive, we are not going to need that. For that You will need to “download” the code from the remote. This process is called pulling.

So the basic ritual of using Git is pushing Your changes to the server, and pull the changes that the other developer has done.

Now that You know what is all about the pull-push programmers’ trend, then let’s catch up with our imaginary team. By now, the team lead should’ve already reviewed the developers’ code and notified the developers about the problems he found and made some improvements to the code, because that query was killing the database with it’s 1753 consecutive requests…

So the developer needs to pull the changes to get the team lead’s improvements, fix the problems team lead wrote, and do a commit again, and after that push to the remote.

After all this problems are fixed and the changes are approved, the application gets deployed to a test server, where the QA engineer can test the functionality and report issues and repeat the pull-push cycle if necessary.

 

We will discuss more complex scenarios in the next articles and examine the power of Git in practice, so stay tuned to our blog to get more information about Git, version control systems and other interesting subjects.

 

External Links:

How to install Git

9 thoughts on “Version Control – Git”

  1. Pingback: GAMING WORLD
  2. Pingback: casino
  3. Pingback: esketamine powder
  4. Pingback: ks quik 2000
  5. Pingback: blote tieten
  6. Pingback: naga356

Comments are closed.

Importance of Version Control
Prev post Importance of Version Control
9 Comments

Whether You are developing a small application or creating a complex business solution, You certainly…

JavaScript and its most used frameworks and libraries
Next post JavaScript and its most used frameworks and libraries
9 Comments

Frameworks try to solve most of the big and known problems that are usually encountered…