0% found this document useful (0 votes)
28 views

Version Controls

The document discusses version control systems including their history and types. It explains localized, centralized, and distributed version control systems. Git is introduced as a widely used distributed version control system, and its installation and basic usage is demonstrated.

Uploaded by

noorullahmd461
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Version Controls

The document discusses version control systems including their history and types. It explains localized, centralized, and distributed version control systems. Git is introduced as a widely used distributed version control system, and its installation and basic usage is demonstrated.

Uploaded by

noorullahmd461
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Version Controls :

The concept of version control has arrived in the Software Configuration


Management(SCM). The SCM mainly handles a few issues in software engineering,
such as coordinating multiple updates from multiple users in multiple environments.
This can be handled when we have a platform for the very new update to be
announced each time as if the identifying, organizing, and controlling modifications
to the software being built by a programming team.

There are four major implementations of this :


 A project database that has relevant configuration objects.
 A version management, shows all versions of a configuration object.
 A facility that everyone could access the configuration objects
 History of the updates till the date.

A number of version control systems establish a change set —a collection of all


changes that are required to create a specific version of the software. captures all
changes to all files in the configuration along with the reason for changes and details
of who made the changes and when. A number of named change sets can be identified
for an application or system. This enables you to construct a version of the software
by specifying the change sets that must be applied to the baseline configuration. To
accomplish this, a system modelling approach is applied.

Version Control System's advantages


When producing software, the Version Control System is highly beneficial and
helpful; it is risky to develop software without version control. It offers safety nets
against ambiguity. Version control systems provide developers with a quick interface.

 The file's whole modification history


 Concurrent operation
 Dividing and combining
 Traceability
Version control systems can be classified into three types:
 Distributed
 Centralized
 Localized

Localized Version Control Systems :


Due to its ease of use, the localized version control system is a popular strategy.
However, there is more of a potential of mistake with this strategy. With this method,
you run the risk of inadvertently writing to the wrong file or copying over unwanted
files because you won't remember which directory you're in.
In order to address this problem, programmers created basic database-based local
VCSs. These databases maintain revision control on all file modifications. Local
copies of the files are maintained via a local version control system.
One primary disadvantage of Local VCS is its single point of failure.

Centralized Version Control System :


On other platforms, the developers had to work along with other developers. This was
an instance of the localized version control system failing. Centralized Version
Control Systems were created as a solution to this issue. There is only one repository
worldwide in centralized version control systems, and each user must commit in order
for their modifications to be reflected in the repository. If you update, it's conceivable
that other people will see your modifications. For your modifications to be visible to
other people, you must do two things:
Commit and provide updates.
It also has several drawbacks, which prompted the creation of DVS. The most evident
is that if the centralized repository goes down during that time, collaborating and
storing versioned changes are rendered impossible. This creates a single point of
failure. What would happen if appropriate backups weren't maintained and the central
database's hard drive became corrupted, You completely lose everything.

Distributed Version Control System :

Multiple repositories are present in distributed version control systems. Every user has
a functional copy and repository of their own. It won't be enough to just commit your
modifications for others to see them. This is due to the fact that committing the
changes will only affect your local repository; in order for the changes to appear in
the central repository, you must push them. In a similar vein,

In order to make your changes visible to others, four things must happen: ₡You
commit You push, They pull, They update. The most widely used distributed version
control systems are Git and Mercurial. These systems help us get around the single
point of failure issue. When you update, you do not receive others' changes unless you
have first pulled those changes into your repository.

Git

Git is a distributed system for version control which is used for both version control
and collaboration with commands.
History of Git :

Version control has been a important part of Software Configuration Management. It


is a process where each time there is an update, it is documented and newer, older are
placed as well here such that if any issue arises in any place, we can simply compare
them.

Previously, open source projects needed to be patched each time as if the new features
or updates were taken with the archive files or sent the patches personally to the head
of the open source project. Around the time of 1992-2002, this process was in use.
After this, in 2002, a new source called Bitkeeper had came up into lime light to work
on these issues like version controlling and also the adding features with new ideas
and so on. Later around in the 2005 to 2006, Bitkeeper started to charge the people for
the services they provide. Then the era of git had evolved. Git has many advantages
than Bitkeeper like easy to understand, same commands in any platform. also the
branching is also available in it.

Git Installation :

Here, to install we need to setup a few requirements as if having a Visual Studio Code.
VS Code is a great light-weight IDE to work with beginners in coding. We personally
preferred the VS Code in the process. Hopefully, to understand further, you must have
a bit of idea about the UI of VS Code.

Later, go to the git website : https://git-scm.com/downloads and install the git for
windows in the standalone version. Later, after the installation, it sets default setting
in environment variables in the system. If not, we need to set the edit environment
variable by ourselves in it. Here I got it by default.

After installation let us check the version using the command called git --version.
Git Setup :
After checking of the version, let us configure git to the personal account of github to
the existing git account on the system

To configure the name with the git and github account initially with the command :

git config --global user.name “username in github account”

To configure the name with the git and github account initially with the command :

git config --global user.email “useremail in github account”


To check this we can run the command called

git config --global --list

Setting up the repository in the folder:

To setup the repository, we need to work on the folder. Here we are taking a folder
called task1. Let us check the status of the folder.

Now let us create the repository using the command : git init -b main

Let us create a text document in it and add it to the repository with git add cc.txt
Now let us test the repository with the git status

Now we are changing the data in txt file and try to commit it.

Now let us see the status of the file.

After the committing, let me change the txt file and check the

Now let us check the with the differences called the git diff
Now let us commit the changes and stage them :

Now let us check the status again :

Now let us see the differences here again :

Here, the txt file is neatly staged and committed here. Previously we just committed
but not staged, now we committed and staged. So, we could not find the difference in
the txt file.

You might also like