Version control is a system that records every change made to a file or set of files over time, so you can recall and restore any specific version later. Rather than keeping folders of files named project_v1.py, project_v2_FINAL.py, and project_v2_FINAL_ACTUALLY.py, version control tracks history automatically and precisely.

What problem does version control solve?

Imagine you are writing a 2,000-line program. You make a change to fix one bug, and suddenly three new things break. You want to undo just that change — but you saved over the old file. Or imagine two classmates editing the same program at the same time on different computers. How do you combine their changes without one person's work overwriting the other's? Version control solves both problems: it records every change with a timestamp and author, and it provides tools to merge simultaneous edits intelligently.

What are the key concepts in version control?

Concept Meaning
Repository (repo) The database that stores all versions and history of a project
Commit A saved snapshot of the files at a particular point, with a message explaining what changed
Branch An independent line of development — changes on a branch do not affect the main code until merged
Merge Combining changes from two branches back into one
Conflict When two people have changed the same part of a file differently — must be resolved manually
Clone Creating a local copy of a remote repository
Push / Pull Send your commits to a remote repo (push) or download new commits from it (pull)

What does a commit history look like?

A commit history is a timestamped log of every saved change. Each commit records: who made the change, when, what the exact change was (the diff), and a human-readable message.

Example commit log (most recent first):

Commit ID Author Date Message
a3f9b21 Aisha 09/07/2026 14:32 Fix: off-by-one error in score calculation
8c2d450 Ben 09/07/2026 11:15 Add: high score display to main menu
3b7e912 Aisha 08/07/2026 16:00 Initial commit: basic game loop

To revert to any previous state, you simply check out that commit. The ability to trace exactly who changed what and when makes debugging much faster and accountability clear.

What is a branch and why is it useful?

A branch is like a parallel universe for your code. The main branch holds the stable, working version. When you want to add a new feature — say, a two-player mode — you create a new branch called feature/two-player. All your experimental changes go there. The main branch is unaffected and always usable.

main:        A --- B --- C ----------------------- G (merged)
                          \                       /
feature/two-player:        D --- E --- F ---------

When the feature is finished and tested, you merge it back into main. If it turns out to be a bad idea, you simply delete the branch — main is untouched.

What is a merge conflict and how is it resolved?

A conflict occurs when two people edit the same line of code differently:

Person A changed line 42 to:   score = score + 10
Person B changed line 42 to:   score = score + 5

Version control cannot automatically choose — it flags the conflict and asks a human to decide which version to keep (or combine them). Conflict markers show both versions:

<<<<<<< branch-A
score = score + 10
=======
score = score + 5
>>>>>>> branch-B

The programmer edits this to keep the correct value, removes the markers, and commits the resolved version.

Git is the most widely used version control software — the tool that actually tracks changes, manages branches, and records commits. It runs on your local machine.

GitHub is a website that hosts Git repositories remotely, adding a web interface, collaboration tools (pull requests, issue tracking), and a backup in the cloud. GitHub is built on top of Git — you can use Git without GitHub, but GitHub requires Git.

Feature Git GitHub
What is it? Version control software Cloud hosting platform for Git repos
Where does it run? Your local computer Remotely, in the cloud
Free? Yes Free tier available
Requires internet? No (local use) Yes

Frequently asked questions

Is version control only for professional programmers?

No. Version control is useful for any project involving files that change over time — essays, design files, spreadsheets, game assets, as well as code. The KS3 computing curriculum introduces it as part of good software development practice. Even for a solo project, having a commit history means you can always undo mistakes and see exactly what changed between working and broken versions.

What does "commit early, commit often" mean?

It is a best practice guideline encouraging developers to make small, frequent commits rather than large infrequent ones. A commit representing 15 minutes of work is easy to review, easy to revert, and has a clear, specific message. A commit representing a week of changes is hard to understand and impossible to partially undo. Small commits keep the history readable and recovery from mistakes precise.

Can version control recover deleted files?

Yes — one of its most useful features. If you accidentally delete a file and commit that deletion, you can revert to a previous commit that included the file. Even if you have already pushed the deletion to a remote repository, the history is preserved and the file can be restored. This is why working in a version-controlled project is far safer than managing files in a single folder.

What is a pull request?

A pull request (PR) is a feature on platforms like GitHub where a developer asks for their branch to be reviewed and merged into the main branch. Other team members can comment on specific lines, suggest changes, and approve or reject the merge. Pull requests are the standard way professional teams review each other's code before it becomes part of the shared codebase — they ensure quality control and knowledge sharing.


Learn version control and software development best practices with Professor Turing at aitutors.me.