Lecture # 1 - Version Control Systems
What is Version Control System. Types of VCS. VCS Tools.
Introduction:
Version control systems (VCS) are tools used in software development to manage changes to source code, documents, and any other files related to a project. They provide a structured way to track modifications, collaborate with others, and maintain a history of changes over time. The primary goal of version control is to enable multiple developers to work on the same project simultaneously while keeping track of every change made to the codebase.
Benefits of VCS:
Collaboration:
Version control facilitates collaboration among developers by providing a centralized platform for sharing code and tracking changes.
History Tracking:
It maintains a detailed history of changes, allowing developers to understand why and how certain decisions were made.
Branching and Experimentation:
Developers can create branches to work on new features or experimental changes without affecting the main codebase.
Backup and Recovery:
VCS serves as a backup mechanism, ensuring that project data is not lost even in the event of hardware failures or accidental deletions.
Types of VCS:
Centralized VCS:
In a centralized VCS like CVS or SVN (Subversion), there is a single central repository where all files and their revisions are stored. Developers check out files from this central repository to work on them and then commit changes back.
Distributed VCS:
Distributed VCS, such as Git and Mercurial, do not necessarily rely on a central server. Instead, each developer clones the entire repository, including its history, onto their local machine. This allows for more flexibility, as developers can work offline and commit changes locally before pushing them to a central or remote repository.
VCS Tools:
Git:
Most widely used distributed VCS, known for its speed, flexibility, and branching model.
SVN (Subversion):
A centralized VCS popular in enterprise environments, known for its simplicity and ease of use.
Mercurial:
Another distributed VCS similar to Git, offering a simpler command set and user interface.
We'll be using git.