Version Control System

Reading Time: 4 minutes

Have you ever used any version control system like git?
If not, you are just a blog away from acing it.

In this blog I will cover the version control systems like git.

Image result for version control system

What is a version control system?

Simply, it is management of changes made to your system. System can be a computer or a software or a large website or a small program or even a text file.

To identify these changes we have a software specific version number or version code. For (even) easier understanding you can take the example of Android and iOS apps version which works on the same lines. Every application on the play store has a version number assigned to it. Each of the new version has some added features or bug fixes. ALL this is done using a version control system.

Why use Version Control ?

Collaboration

Without a VCS , you could be working together in a folder (shared to all the team members) on the same set of files. You would have to make sure that if you are currently working on file “abc” then other team members have no write permission on the file “abc“. It’s like living your life on an edge. And its not the workflow you are looking for. Some day or the other someone will overwrite other’s work.

With a VCS, everybody on the team is able to work freely – on any file. The VCS will allow you to collaborate all the changes into a specific version of your project. As soon as an update is made you will be notified about that. The latest upgraded version is at a central place called central or remote repository.

Image result for version control system

Storing Versions

Saving different versions of your project is a good practice but saving all the versions on the same system will become very complicated.

A version control system makes sure that there is only one local project. Thus, there’s only one version on which you can work on your local repository. Everything else – all the past versions – are neatly stacked, properly documented and stored in the central repository and the versions are named accurately. When you require it, you can request any version and you’ll have that version of the project at your service in an instant.

Image result for storing versions in vcs

Backup

Apart from just storing versions it also provides security to the project. Any VCS like git can act as a backup; every team member has a full version of the project on his local repository – including the project’s complete historical snapshot. In case the central server breaks down, all you need for recovery is any of your team member’s local Git repository.

Types of Version Control System

There are two types of version control: centralized and distributed.

Centralized Version Control System

With centralized version control systems, you have a single “central” copy of your project on a server and commit your changes to this central copy. You pull the files that you need, but you never have a full copy of your project locally. Some of the most common version control systems are centralized, including Subversion (SVN) and Perforce.

Related image

Distributed Version Control System

With distributed version control systems, we don’t need to store all data on our local repository. Instead, we can clone the remote repository to the local has a and have a full snapshot of your project history. Some common distributed version control systems are Git and Mercurial. That’s where Bitbucket comes in. Keep a copy of your code in a repository on Bitbucket so that you and your teammates can use Git or Mercurial locally and to push and pull the code.

Image result for distributed version control system

While you don’t have a central repository on your local system but you want to store everything on a remote repository. This is provided by GitHub or BitBucket. You can perform clone operation to copy a project from GitHub to your local repository.

knoldus-advt-sticker
Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!