Module_4
Module_4
Identification of
Different Version Control Systems
Modules Objective
• Identify the local version control works ?
• Discuss the nature and characteristics of CVCS ?
• Discuss the nature and characteristics of DVCS ?
• Identify workspace?
• Merging of the source code ?
• Scaling in version control system?
• CVCS vs DVCS?
• Identify the multiple repositories model ?
Identify the types of repositories :
• Local repositories reside on the computers of team members. In contrast, remote repositories are hosted on a server that
is accessible for all team members - most likely on the internet or on a local network.
• Local version control keeps track of the files within the local system.
• Local version control systems save a series of patches, but collaboration or branching is almost impossible with local
repositories.
• A local repository, from a DVCS viewpoint is a collection of files which originate from a certain version of the repository
• The collection of files is called the working tree or the checkout.
• A local version control, as the name suggests is a local system that keep track of trees within the local systems.
• We now look at local repositories from a DVCS viewpoint
• There are two kinds of repositories the DVCS.
• Local repository-copy of a central repository that is available on the local computer
• Remote repository-the repository available in the central server
• The primary advantage of DVCS like Git is that local repository is the mirror central repository. It is the local repository
that the developers make the necessary changes.
• The local repository is called the working copy of the checkout.
• From working directory ,changes are added to the staging area and then committed to the local repository
• From Local repository changes are then pushed to the remote repository
Centralized Version Control System
• In a centralized (CVCS), a server acts as the main repository which stores every version of code.
• Using centralized source control, every user commits directly to the main branch, so this type of version control often
works well for small teams, because team members have the ability to communicate quickly so that no two developers
want to work on the same piece of code simultaneously.
• Strong communication and collaboration are important to ensure a centralized workflow is successful.
• Centralized version control systems are based on the idea that there is a single “central” copy of your project somewhere
(probably on a server), and programmers will “commit” their changes to this central copy. “Committing” a change simply
means recording the change in the central system.
Centralized Version Control System
• In centralized source control, there is a server and a client.
• The server is the master repository that contains all of the versions of the code. To work on any project, firstly user or
client needs to get the code from the master repository or server.
• So the client communicates with the server and pulls all the code or current version of the code from the server to their
local machine. In other terms we can say, you need to take an update from the master repository and then you get the
local copy of the code in your system.
• So once you get the latest version of the code, you start making your own changes in the code and after that, you simply
need to commit those changes straight forward into the master repository.
• Committing a change simply means merging your own code into the master repository or making a new version of the
source code. So everything is centralized in this model.
• There will be just one repository and that will contain all the history or version of the code and different branches of the
code. So the basic workflow involves in the centralized source control is getting the latest version of the code from a
central repository that will contain other people’s code as well, making your own changes in the code, and then
committing or merging those changes into the central repository.
CVCS :
What are the advantages of a centralized
version control system?
Works well with binary files
• Binary files, such as graphic assets and text files, require a large amount of space, so software developers turn to
centralized version control systems to store this data. With a centralized server, teams can pull a few lines of code without
saving the entire history on their local machine. Users of distributed systems have to download the entire project, which
takes up time and space and prevents them from doing diffs. If a team works with binary files regularly, a centralized
system offers the most efficient approach to code development.
Offers full visibility
• With a centralized location, every team member has full visibility into what code is currently worked on and what changes
are made. This knowledge helps software development teams understand the state of a project and provides a foundation
for collaboration, since developers share work in the central server. A centralized version control system only has two data
repositories that users have to monitor: the local copy and the central server. Distributed version control systems, like Git,
use multiple repositories, which can decrease insight into projects.
What are the advantages of a centralized
version control system?
Decreases the learning curve
• Centralized version control is easy to understand and use, so developers of any skill level can push changes and start
contributing to the code quickly. Setting up the system and the workflow is also simple and doesn’t require a significant
amount of time investment to establish how the software development team should use the tool. When developers can
navigate a workflow quickly and easily, they’re able to focus on feature development rather than memorizing a series of
complicated steps to merge versioned changes. Decreasing the learning curve also helps new developers make an impact
as soon as possible.
• Centralized systems are typically easier to understand and use
• You can grant access level control on directory level
What are the disadvantages of a centralized
version control system?
• A single point of failure risks data
• The biggest disadvantage is the single point of failure embedded within the centralized server. If the remote server
goes down, then no one can work on the code or push changes. The lack of offline access means that any disruption
can significantly impact code development and even result in code loss. The entire project and team comes to a
standstill during an outage. In the event of hard disk corruption, software development teams must rely on backups
to retrieve the running history of a project. If backups haven’t been kept properly, then the team loses everything.
When storing all versions on a central server, teams risk losing their source code at any time. Only the snapshots on
local machines are retrievable, but that is a small amount of code compared to the entire history of a project.
• Unlike a centralized VCS, a distributed version control system enables every user to have a local copy of the running
history on their machine, so if there’s an outage, every local copy becomes a backup copy and team members can
continue to development offline.
• Slow speed delays development
• Centralized version control system users often have a difficult time branching quickly, because users must
communicate with the remote server for every command, which slows down code development. Branching becomes
a time-consuming task and allows merge conflicts to appear, because developers can’t push their changes to the
repository fast enough for others to view. If team members have slow network connections, the code development
process becomes even more tedious when trying to connect with the remote server.
What are the disadvantages of a centralized
version control system?
• The speed at which software development teams operate has a direct impact on how quickly they can ship features and
deliver business value. If teams are slow to develop, iteration and innovation stall and developers can become frustrated
with how long it takes to see their changes in the application. Missed releases are possible if the remote server or
networks are down, and team members won’t be able to make up for lost time and quickly push changes.