Sunteți pe pagina 1din 15

A Seminar Report on

Need of
Version Control System
Submitted in partial fulfillment of the degree of
Master of Computer Applications
V Semester

Submitted by

Rishabh Dadhich

Under the Supervision of


Prof. Arpita Mathur
Faculty of Computer Science

Faculty of Computer Science


Lachoo Memorial College of Science & Technology (Autonomous)
Jodhpur

2019

MCA 2019
Faculty of Computer Science
Lachoo Memorial College of Science & Technology
(Autonomous)

CERTIFICATE

This is to certify that the Seminar entitled

Need of Version Control System

has been presented by

Rishabh Dadhich

in partial fulfillment of the degree of MCA V Semester Examination 2019, under my


supervision and guidance.

Prof. (Dr.) Priyadarshi Patni Prof. Arpita Mathur


Director Assistant Professor,
Faculty of Computer Sc Faculty of Computer Sc

Date:

MCA 2019
Acknowledgement

I have taken efforts in this Seminar report. However, it would not have been possible
without the kind support and help of many individuals. I would like to extend my
sincere thanks to all of them. I would like to take the opportunity to express my
humble gratitude to Prof. Arpita Mathur under whom I executed this report. Her
constant guidance and willingness to share his vast knowledge made me understand
this report and its manifestations in great depths and helped me to complete the
assigned tasks.

I would like to thank our Director (Dr.) Priyadarshi Patni and Prof. (Dr.) Mukesh
Upadhyay and other faculty of the Department of Computer Science, Lachoo
Memorial College of Science & Technology for their generous help in various ways
for the completion of this seminar report.

Special appreciation to my friend Vishal Das (GitHub Campus Ambassador,


Punjab) for his support and guidance over this topic.

Finally, yet importantly, I would like to express my heartfelt thanks to my


beloved parents for their blessings, my friends and classmates for their help and
wishes for the successful completion of this report..

Rishabh Dadhich

MCA 2019
Contents

1. Introduction

2. .........................................

3. .........................................

4. .........................................

5. .........................................

6. .........................................

7. .........................................

8. .........................................

9. .........................................

10..........................................

11. Conclusion

12. References

Appendix

MCA 2019
Introduction

What is “version control”, and why should you care? Version control is a system that
records changes to a file or set of files over time so that you can recall specific
versions later. For the examples in this book, you will use software source code as the
files being version controlled, though in reality you can do this with nearly any type
of file on a computer.
If you are a graphic or web designer and want to keep every version of an image or
layout (which you would most certainly want to), a Version Control System (VCS) is
a very wise thing to use. It allows you to revert selected files back to a previous state,
revert the entire project back to a previous state, compare changes over time, see who
last modified something that might be causing a problem, who introduced an issue
and when, and more. Using a VCS also generally means that if you screw things up or
lose files, you can easily recover. In addition, you get all this for very little overhead.
Local Version Control Systems
Many people’s version-control method of choice is to copy files into another directory
(perhaps a time-stamped directory, if they’re clever). This approach is very common
because it is so simple, but it is also incredibly error prone. It is easy to forget which
directory you’re in and accidentally write to the wrong file or copy over files you
don’t mean to.
To deal with this issue, programmers long ago developed local VCSs that had a
simple database that kept all the changes to files under revision control.

MCA 2019
Centralized Version Control Systems
The next major issue that people encounter is that they need to collaborate with
developers on other systems. To deal with this problem, Centralized Version Control
Systems (CVCSs) were developed. These systems (such as CVS, Subversion, and
Perforce) have a single server that contains all the versioned files, and a number of
clients that check out files from that central place. For many years, this has been the
standard for version control.

This setup offers many advantages, especially over local VCSs. For example,
everyone knows to a certain degree what everyone else on the project is doing.
Administrators have fine-grained control over who can do what, and it’s far easier to
administer a CVCS than it is to deal with local databases on every client.
However, this setup also has some serious downsides. The most obvious is the single
point of failure that the centralized server represents. If that server goes down for an
hour, then during that hour nobody can collaborate at all or save versioned changes to
anything they’re working on. If the hard disk the central database is on becomes
corrupted, and proper backups haven’t been kept, you lose absolutely everything —
 the entire history of the project except whatever single snapshots people happen to
have on their local machines. Local VCS systems suffer from this same problem —
 whenever you have the entire history of the project in a single place, you risk losing
everything.

MCA 2019
Distributed Version Control Systems
This is where Distributed Version Control Systems (DVCSs) step in. In a DVCS
(such as Git, Mercurial, Bazaar or Darcs), clients don’t just check out the latest
snapshot of the files; rather, they fully mirror the repository, including its full history.
Thus, if any server dies, and these systems were collaborating via that server, any of
the client repositories can be copied back up to the server to restore it. Every clone is
really a full backup of all the data.

Furthermore, many of these systems deal pretty well with having several remote
repositories they can work with, so you can collaborate with different groups of
people in different ways simultaneously within the same project. This allows you to
set up several types of workflows that aren’t possible in centralized systems, such as
hierarchical models.

MCA 2019
Previous System

So how does the programmers work when there was no VCS? Well, It was a
Nightmare as there was no Open Source Version Systems were available for Software
Development..
The other answers have phrases like "Every project had a master copy" but the reality
was far worse. Before Unix became wide spread, it was common to hear horror
stories about lost source code. Even major projects like HASP were rumored to be
based to some degree on reconstructed code due to lost source. Dropping a box of
cards could be disastrous. I remember one place where they hired somebody to
simply mark out some columns of output because they had lost the source code and
the original author of the software had died.

One thing that did happen is that due to the difficulty in editing many kinds of
storage, it was fairly common to not actually edit the original but instead to apply so-
called "edit tapes" to the original code to produce the actual code to be
compiled. These edit tapes were essentially diffs or sed programs on paper or
magnetic tape. Edit tapes were created were created manually by reference to the
printed source of the program being modified. The resulting process actually had
some of the features of source code control in that you could simply not apply some
edit tapes in order to go back to previous versions. You could also go back to
previous source printouts (yes, the last backup was actually paper) and correct old edit
tapes by hand. Needless to say, this was (ahem) error prone.

Truly ubiquitous adoption of source code control occurred much later than you might
think. I remember running into cowboy engineers who sneered at wussy folks like me
who used version control even as late as the early 2000's. Web teams were
particularly resistant. The fact that poor version control hygiene is nearly
inconceivable now is probably one of the most desirable effects of open source
software.

MCA 2019
Benefits of VCS

Developing software without using version control is risky, like not having backups.
Version control can also enable developers to move faster and it allows software
teams to preserve efficiency and agility as the team scales to include more developers.
Version Control Systems (VCS) have seen great improvements over the past few
decades and some are better than others. VCS are sometimes known as SCM (Source
Code Management) tools or RCS (Revision Control System). One of the most popular
VCS tools in use today is called Git. Git is a Distributed VCS, a category known as
DVCS, more on that later. Like many of the most popular VCS systems available
today, Git is free and open source. Regardless of what they are called, or which
system is used, the primary benefits you should expect from version control are as
follows.
1. A complete long-term change history of every file. This means every change
made by many individuals over the years. Changes include the creation and
deletion of files as well as edits to their contents. Different VCS tools differ on
how well they handle renaming and moving of files. This history should also
include the author, date and written notes on the purpose of each change.
Having the complete history enables going back to previous versions to help in
root cause analysis for bugs and it is crucial when needing to fix problems in
older versions of software. If the software is being actively worked on, almost
everything can be considered an "older version" of the software.
2. Branching and merging. Having team members work concurrently is a no-
brainer, but even individuals working on their own can benefit from the ability
to work on independent streams of changes. Creating a "branch" in VCS tools
keeps multiple streams of work independent from each other while also
providing the facility to merge that work back together, enabling developers to
verify that the changes on each branch do not conflict. Many software teams
adopt a practice of branching for each feature or perhaps branching for each
release, or both. There are many different workflows that teams can choose
from when they decide how to make use of branching and merging facilities in
VCS.
3. Traceability. Being able to trace each change made to the software and
connect it to project management and bug tracking software such as Jira, and
being able to annotate each change with a message describing the purpose and
intent of the change can help not only with root cause analysis and other
forensics. Having the annotated history of the code at your fingertips when
you are reading the code, trying to understand what it is doing and why it is so
designed can enable developers to make correct and harmonious changes that
are in accord with the intended long-term design of the system. This can be
especially important for working effectively with legacy code and is crucial in
enabling developers to estimate future work with any accuracy.

MCA 2019
While it is possible to develop software without using any version control, doing so
subjects the project to a huge risk that no professional team would be advised to
accept. So the question is not whether to use version control but which version control
system to use.
There are many choices, but here we are going to focus on just one, Git.

MCA 2019
What is Git?

By far, the most widely used modern version control system in the world today is Git.
Git is a mature, actively maintained open source project originally developed in 2005
by Linus Torvalds, the famous creator of the Linux operating system kernel. A
staggering number of software projects rely on Git for version control, including
commercial projects as well as open source. Developers who have worked with Git
are well represented in the pool of available software development talent and it works
well on a wide range of operating systems and IDEs (Integrated Development
Environments).
Having a distributed architecture, Git is an example of a DVCS (hence Distributed
Version Control System). Rather than have only one single place for the full version
history of the software as is common in once-popular version control systems like
CVS or Subversion (also known as SVN), in Git, every developer's working copy of
the code is also a repository that can contain the full history of all changes.
In addition to being distributed, Git has been designed with performance, security and
flexibility in mind.
So, what is Git in a nutshell? This is an important section to absorb, because if you
understand what Git is and the fundamentals of how it works, then using Git
effectively will probably be much easier for you. As you learn Git, try to clear your
mind of the things you may know about other VCSs, such as CVS, Subversion or
Perforce — doing so will help you avoid subtle confusion when using the tool. Even
though Git’s user interface is fairly similar to these other VCSs, Git stores and thinks
about information in a very different way, and understanding these differences will
help you avoid becoming confused while using it.

MCA 2019
Why Git?
Performance
The raw performance characteristics of Git are very strong when compared to many
alternatives. Committing new changes, branching, merging and comparing past
versions are all optimized for performance. The algorithms implemented inside Git
take advantage of deep knowledge about common attributes of real source code file
trees, how they are usually modified over time and what the access patterns are.
Unlike some version control software, Git is not fooled by the names of the files when
determining what the storage and version history of the file tree should be, instead,
Git focuses on the file content itself. After all, source code files are frequently
renamed, split, and rearranged. The object format of Git's repository files uses a
combination of delta encoding (storing content differences), compression and
explicitly stores directory contents and version metadata objects. Being distributed
enables significant performance benefits as well.
For example, say a developer, Alice, makes changes to source code, adding a feature
for the upcoming 2.0 release, then commits those changes with descriptive messages.
She then works on a second feature and commits those changes too. Naturally these
are stored as separate pieces of work in the version history. Alice then switches to the
version 1.3 branch of the same software to fix a bug that affects only that older
version. The purpose of this is to enable Alice's team to ship a bug fix release, version
1.3.1, before version 2.0 is ready. Alice can then return to the 2.0 branch to continue
working on new features for 2.0 and all of this can occur without any network access
and is therefore fast and reliable. She could even do it on an airplane. When she is
ready to send all of the individually committed changes to the remote repository,
Alice can "push" them in one command.
Security
Git has been designed with the integrity of managed source code as a top priority. The
content of the files as well as the true relationships between files and directories,
versions, tags and commits, all of these objects in the Git repository are secured with
a cryptographically secure hashing algorithm called SHA1. This protects the code and
the change history against both accidental and malicious change and ensures that the
history is fully traceable.With Git, you can be sure you have an authentic content
history of your source code.
Some other version control systems have no protections against secret alteration at a
later date. This can be a serious information security vulnerability for any
organization that relies on software development.
Flexibility
One of Git's key design objectives is flexibility. Git is flexible in several respects: in
support for various kinds of nonlinear development workflows, in its efficiency in
both small and large projects and in its compatibility with many existing systems and
protocols.

MCA 2019
Git has been designed to support branching and tagging as first-class citizens (unlike
SVN) and operations that affect branches and tags (such as merging or reverting) are
also stored as part of the change history. Not all version control systems feature this
level of tracking.

Version control with Git


Git is the best choice for most software teams today. While every team is different
and should do their own analysis, here are the main reasons why version control with
Git is preferred over alternatives:
Git is good
Git has the functionality, performance, security and flexibility that most teams and
individual developers need. These attributes of Git are detailed above. In side-by-side
comparisons with most other alternatives, many teams find that Git is very favorable.
Git is a de facto standard
Git is the most broadly adopted tool of its kind. This is makes Git attractive for the
following reasons. Most of the Software Companies have their project source code is
managed in Git.
Vast numbers of developers already have Git experience and a significant proportion
of college graduates may have experience with only Git. While some organizations
may need to climb the learning curve when migrating to Git from another version
control system, many of their existing and future developers do not need to be trained
on Git.
In addition to the benefits of a large talent pool, the predominance of Git also means
that many third party software tools and services are already integrated with Git
including IDEs, and our own tools like DVCS desktop client Sourcetree, issue and
project tracking software, Jira, and code hosting service, Bitbucket.
If you are an inexperienced developer wanting to build up valuable skills in software
development tools, when it comes to version control, Git should be on your list.
Git is a quality open source project
Git is a very well supported open source project with over a decade of solid
stewardship. The project maintainers have shown balanced judgment and a mature
approach to meeting the long term needs of its users with regular releases that
improve usability and functionality. The quality of the open source software is easily
scrutinized and countless businesses rely heavily on that quality.
Git enjoys great community support and a vast user base. Documentation is excellent
and plentiful, including books, tutorials and dedicated web sites. There are also
podcasts and video tutorials.

MCA 2019
Being open source lowers the cost for hobbyist developers as they can use Git without
paying a fee. For use in open-source projects, Git is undoubtedly the successor to the
previous generations of successful open source version control systems, SVN and
CVS.
Criticism of Git
One common criticism of Git is that it can be difficult to learn. Some of the
terminology in Git will be novel to newcomers and for users of other systems, the Git
terminology may be different, for example, revert in Git has a different meaning than
in SVN or CVS. Nevertheless, Git is very capable and provides a lot of power to its
users. Learning to use that power can take some time, however once it has been
learned, that power can be used by the team to increase their development speed.
For those teams coming from a non-distributed VCS, having a central repository may
seem like a good thing that they don't want to lose. However, while Git has been
designed as a distributed version control system (DVCS), with Git, you can still have
an official, canonical repository where all changes to the software must be stored.
With Git, because each developer's repository is complete, their work doesn't need to
be constrained by the availability and performance of the "central" server. During
outages or while offline, developers can still consult the full project history. Because
Git is flexible as well as being distributed, you can work the way you are accustomed
to but gain the additional benefits of Git, some of which you may not even realise
you're missing.
Now that you understand what version control is, what Git is and why software teams
should use it, read on to discover the benefits Git can provide across the whole
organization.

MCA 2019
Why Git for the organisation?
Switching from a centralized version control system to Git changes the way your
development team creates software. And, if you’re a company that relies on its
software for mission-critical applications, altering your development workflow
impacts your entire business.

MCA 2019

S-ar putea să vă placă și