You are on page 1of 29

Version Control System

Software Engineering : Dr. Suchi Kumari


Version Control System (VCS)

• Helps in recording changes made to files by keeping a track of modifications


done in the code.
• A separate branch is created for every contributor who made the changes.
• Changes aren’t merged into the original source code directly.
• Changes are analyzed and then merged to the main source code.

Software Engineering : Dr. Suchi Kumari


Version
Control
Bersoff’s First "Law"

Software Engineering : Dr. Suchi Kumari


Reality without Version Control

Software Engineering : Dr. Suchi Kumari


Reality with Version
Control

Software Engineering : Dr. Suchi Kumari


Rolling Back
Useful?
Software Engineering : Dr. Suchi Kumari
Why we need VCS?
Improves Communication among development Team members

Improves Development speed

Reduce possibility of Error

Contributors can contribute irrespective of their GEO location

Keeps information about WHO, WHAT, WHEN, and WHY changes have been
made
Software Engineering : Dr. Suchi Kumari
Types of VCS

Local Version Centralized Version Distributed Version


Control System Control System Control System

Software Engineering : Dr. Suchi Kumari


Types of VCS: Local

Local Version Control System


• Simplest forms
• Has a database that kept all the changes to files under revision control.
• It keeps patch sets (differences between files) in a special format on
disk.
• By adding up all the patches it can then re-create what any file looked
like at any point in time

Software Engineering : Dr. Suchi Kumari


Types of VCS: Centralized

Central Version Control System (CVCS)


• Contains just one repository
globally
• Every user need to commit for
reflecting one’s changes in the
repository.
• It is possible for others to see
your changes by updating.

Software Engineering : Dr. Suchi Kumari


Types of VCS: Distributed

Distributed Version Control System


• Each user has their repository and working copy.
• Commit will not give others access to your
changes.
• Commit will reflect those changes in local
repository
• Need to push them to make them visible on the
central repository.
• Update Operation, you do not get others’ changes
• First pull those changes into your repository

Software Engineering : Dr. Suchi Kumari


CVCS vs DVCS

• DVCS has the biggest advantage in that it allows you to work offline
• DVCS is faster than CVCS because you don’t need to communicate with the
remote server for each command
• Working on branches is easy in DVCS. Every developer has an entire history of
the code in DVCS
• Downloading the entire project in DVCS can take more time and space
• If the main server goes down or it crashes in DVCS, you can still get the backup

Software Engineering : Dr. Suchi Kumari


Git vs GitHub

Git GitHub
Free DVCS tool (software) Service
Command line tool GUI based web service (Cloud based)
Can be installed on a System Hosting service for Git Repositories
For code sharing and VC Free and Subscription version
Open source

Software Engineering : Dr. Suchi Kumari


Working of
Git
Repository

Software Engineering : Dr. Suchi Kumari


Pull Often
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Without Branching
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari
Software Engineering : Dr. Suchi Kumari

You might also like