Version Control Systems (VCS)
-
DevOps Engineer Perspective:
- To create a CI/CD Pipeline which follows developers submitting the application code to Version Control System. To create CI CD Pipeline we need to understand how version control systems work
- As a DevOps Engineer we would be developing lot of stuff to automate the deployment and to store that work we need to know about Version Control Systems (VCS)
-
Lets understand different perspectives
- One Developer:
- Overview: One Developer who develops and deploys the application
- Possible Problems
- Laptop might crash and all the data will be lost
- Mitigation: Every day after he finishes the work he uploads the whole code into google/one drive
- Need for Versioning:
- Need for working on parallel releases and merging changes between releases
- Laptop might crash and all the data will be lost
- Multiple Developers:
- Possible Problems:
- Sharing Code and ensuring the changes done all the developers are recorded is not possible easily without a human involvement
- Allowing some developers on Release 1 and Some on Release 2 is difficult to manage
- Possible Problems:
- Multiple Sites (Different Locations of Developers across the globe):
- Possible Problems:
- Sharing Code and ensuring the changes done all the developers are recorded is not possible easily without a human involvement
- Possible Problems:
- One Developer:
-
Version Control, also known as Source control is a software which is used to solve the most of the above problems discussed.
-
Version Control System software keeps track of every modification to the code in some special database, if mistake is made developer can revert to the older version or compare with earlier versions & also allows multiple developers working on the same code base by giving connectivity over popular protocols (http, tcp)
-
Examples of Version Control Systems Software
- CVS
- Subversion
- Visual Source Safe
- IBM ClearCase
- TFS
- Mercurial
- Perforce
- Git
-
Git is very popular version control system developed by Linus Torvalds (Founder of Linux Kernel) to make the Version Control Software simpler.
-
Architecturally we have two Types of Version Control Systems
- Centralized Version Control Systems
- Distributed Version Control Systems
Softwares to be installed
- Windows: Refer Here
- Windows 10 and above User: Refer Here
- Mac:
- Install Homebrew: Refer Here
- Install Git:
brew install git
- Install Visual Studio Code: Refer Here
brew install --cask visual-studio-code