What Is Version Control

Updated · 11 min read
easyGit 2.53gitversion-controlbasicsinterview

Advitha is writing a science project report. Every evening she saves her work under a new name, so she never loses the old one. After two weeks, her folder looks like this:

Advitha's project folder
report.docx
report_final.docx
report_final_v2.docx
report_final_v2_really_final.docx
report_final_v2_really_final_PRINT_THIS.docx

You have probably had a folder like this too. It feels safe, because every copy is still there. But the folder can't answer the questions that matter. Which file is the newest? What changed between v2 and really_final? Why was the conclusion rewritten? And if Navika helped with one chapter, which file has her changes?

Version control solves this problem. This lesson explains what it is, why every software team uses it, and where Git fits in.

Why Copies with New Names Are Not Enough

Saving a new copy for every change works for one person and a handful of files. It breaks down quickly after that.

QuestionWith copies and file namesWith version control
Which version is the latest?You guess from the names and datesThere is one project, and its newest version is always clear
What exactly changed?You open two files and compare them by eyeOne command shows the changed lines
Who made the change, and when?Nobody knowsRecorded with every change
Why was it changed?Nobody remembersEach change carries a short message
Can I go back to last Tuesday?Only if you saved a copy that dayYes, to any saved version
Can two people work at once?One person's file overwrites the other'sBoth sets of changes are combined

Now imagine the same mess in a software project. A small app has hundreds of files, and a team of three changes dozens of them every day. Copies with clever names can't keep up.

What Version Control Means

Version control is a way of recording the changes made to a set of files over time, so that you can see any earlier version and bring it back when you need it. The tool that does the recording is called a version control system, often shortened to VCS. You will also see the names source control and revision control. They mean the same thing.

Think of the save points in a video game. Before a difficult level, you save. If things go badly, you load the save point and try again, and nothing is lost. A version control system gives your project save points, and each one records four things:

It recordsExample
What changedTwo lines added to FeeCalculator.java
Who changed itNavika Anamaneni
WhenJanuary 5, 2026, 10:07 in the morning
Why"Add a late fee for payments after the due date"

In Git, one of these save points is called a commit. You will make your first one very soon.

What a Version Control System Gives You

Once a project is under version control, six things become easy.

  1. A complete history. Every saved version of every file is kept, with its author, date and message.
  2. A safe undo. A bad change can be reversed, even weeks later, without touching the work done after it.
  3. Teamwork without overwriting. Several people can change the same project, and even the same file, at the same time. The system combines their work and tells you when two changes clash.
  4. Room to experiment. You can try an idea on a separate line of work, called a branch, and keep the main version working. If the idea fails, you throw the branch away.
  5. Answers. "When did this bug appear?" and "Why is this line here?" become questions you can look up instead of guess.
  6. A backup. With a distributed system such as Git, every team member's computer holds the whole history.

Three Kinds of Version Control

Version control systems have been around since the 1970s. They come in three kinds, and each kind fixed a weakness of the one before it.

Local, centralized and distributed version control

Local Version Control

The history is kept in a small database on your own computer. RCS, released in 1982, works this way. It is better than renaming files, but it only helps one person on one machine. If the disk fails, the history is gone with it.

Centralized Version Control

One central server keeps the full history. Each person's computer holds only the latest files, and every save goes straight to the server. CVS and Subversion (SVN) work this way, and many companies still run Subversion today.

A team can now work together, but everything depends on that one server. If it is down, or you are on a train without internet, you can't save a version or look at the history. If the server's disk is lost and there is no backup, the project's history is lost.

Distributed Version Control

Every person has a full copy of the project and its entire history on their own computer. This copy is called a repository. You save versions, compare them and go back in time without any network. When you are ready, you exchange your new work with a shared repository that the team agrees on. Git and Mercurial work this way.

LocalCentralizedDistributed
ExamplesRCSCVS, SubversionGit, Mercurial
Where the history livesOne computerOne serverEvery computer
Works for a teamNoYesYes
Works without a networkYesNoYes
If the main copy is lostHistory is lostHistory is lostRestore it from any other copy

Where Version Control Is Used

Version control began with source code, but it works for any files that change over time, especially text files:

  • Source code in every language: Java, Python, JavaScript and the rest.
  • Configuration files that describe how servers and applications are set up.
  • Documentation, books and websites. Many technical books are written as plain text files and kept in Git.
  • Database scripts, so that every change to a database structure is recorded.

It suits text best, because the system can show you the exact lines that changed. Large binary files such as videos can be stored too, but they need extra care. You will learn how later in the course.

Common Mistakes

Thinking a cloud folder is version control. Google Drive, OneDrive and Dropbox keep a copy of your files online, and some keep a few older copies. That is a backup. It doesn't group related changes together, record why they were made, or combine the work of two people who edited the same file.

Thinking version control is only for teams. A single developer gains the history, the undo and the freedom to experiment. Most developers put even their smallest personal projects under version control.

Saving one giant version at the end of the week. A history with one save point called "this week's work" tells you nothing. Small, frequent save points with clear messages are what make it possible to find and undo a single mistake.

Treating "version control", "Git" and "GitHub" as the same word. Version control is the idea. Git is one tool that does it. GitHub is a website that stores Git projects. The lesson "Git vs GitHub, GitLab and Bitbucket" separates them clearly.

Interview Corner

What is version control, and why do teams use it?

Version control is a system that records changes to files over time, so that any earlier version can be viewed or restored. Teams use it to keep a full history (what changed, who changed it, when and why), to undo mistakes safely, to let several people work on the same code without overwriting each other, and to try new ideas on branches without breaking the working version.

What is the difference between centralized and distributed version control?

In a centralized system such as Subversion, one server holds the full history and each developer has only a working copy of the latest files. Saving a version needs the server. In a distributed system such as Git, every developer has a complete copy of the repository, including its history. They can commit, view history and create branches offline, and they share work by exchanging commits with other repositories. There is no single point of failure, because every copy is a full backup.

Is a backup the same as version control?

No. A backup keeps copies of files so they can be recovered after a loss. Version control records meaningful changes: each save point groups related edits and stores the author, the time and a message that explains the reason. It can also show the differences between versions and combine the work of several people, which a backup can't do.

Name some version control systems.

Git and Mercurial are distributed. Subversion (SVN), CVS and Perforce are centralized. RCS is a local system. Git is by far the most widely used today.

Practice

You don't need Git installed for this lesson. These two tasks are about the idea.

  1. Explain it: in your own words, tell a friend why report_final_v2_really_final.docx is a version control problem. Mention at least two questions that the file names can't answer.
  2. Look at your own files: find a folder on your computer where you kept several copies of the same file. Write down what you would want to know about those copies today (which is newest, what changed, why). Each item on your list is something a version control system records for you.
Show a sample answer for task 1

"The file names try to record history, but they can't. I can't tell which copy is the newest, I can't see what changed between two copies without reading both, and nobody knows why a change was made. If two of us edit our own copies, one of us has to merge the changes by hand. Version control keeps one project and records every change with its author, time and reason."

Quick check: What is version control

4 questions
1What does a version control system record?
2In a centralized system such as Subversion, what happens when the server is down?
3What does "distributed" mean for a system such as Git?
4Which of these is version control and not only a backup?

Key Takeaways

Quick reference

TermMeaning
Version control system (VCS)A tool that records changes to files over time
RepositoryA project together with its full history
CommitOne save point in the history (the Git name for it)
BranchA separate line of work for trying an idea safely
CentralizedOne server holds the history (Subversion, CVS)
DistributedEvery computer holds the history (Git, Mercurial)

Was this tutorial helpful?

Lesson 1 of 106