Skip to main content

Command Palette

Search for a command to run...

What is 'VCS' (version control system)?

Version control system | Basics | what's the need | Advantages

Updated
2 min read
What is 'VCS' (version control system)?
S

A student of CSE, having interest in open source and development...

VCS -> Version Control System

what is 'VCS'

  • It is a software or system used for managing different versions (changes) in the working project.
  • it manages and considers only the changes in the project and not all the files.

naive way to implement 'VCS'

let, we have a project-1 directory, inside it, we will store our project files...
to begin with, project-1 look like this :

pr-1.png

  • packages is a large directory containing all the necessary files/modules for the project.
  • readMe.txt is normal text file.

readMe.txt contains:

Welcome

Now we have a need that we want the exact code and files as project-1 but having different version of readMe.txt

What should be done now?

  • make another directory project-2
  • copy all the data from project-1 to project-2
  • change readMe.txt

now we have,

pr-1-1.png

project-2 look like this

pr-2.png

readMe.txt contains:

Hello world

But what's the catch here?

We have copied the entire project just to manage a minute change in the readMe.txt, and that's not efficient.
If we have had giga-bytes of data in packages directory then how would we even copy and store such a large file.

In the above example

Everything is same, the file structure, the packages directory, the only difference is in the readMe.txt.

so what if we have had a way to consider only the changes in the project whatever change it is, and leave the other non-changed files as they are...

and that's why there we seek the need for VCS.

VCS only considers and counts the changes in the project and put intact the remaining data/files.

Therefore, for above example VCS only tracks the readMe.txt as the packages directory is same in both versions of the project hence will be kind of 'ignored', and only the changes in readMe.txt will be maintained.

So by implementing the VCS we can literally jump back and forth in different versions of the project...

One example of VCS -> git.

https://git-scm.com/