Skip to main content

Command Palette

Search for a command to run...

Why Version Control Exists: A Video Game Perspective

Updated
6 min read
Why Version Control Exists: A Video Game Perspective
S
Full-stack developer obsessed with performance, scalability, and clean systems. I use Arch btw.

Introduction

Imagine you just started playing your favorite video game, GTA, and were greeted with this legendary scene:

You played the game for hours, completing mission after mission. But then, you failed a mission badly and wanted to reload from the last mission to try again with a fresh start. And then it hits you, what if you hadn't saved your game? 😵 This is exactly the kind of problem Version Control Systems like Git solve for developers.


Problems Faced Before Version Control Systems

Lack of a “Load Game” Feature

Flow diagram showing software development with version control, where features are added sequentially and a faulty feature can be easily reverted to a previous stable state.

Imagine you're developing a feature for your new, shiny todo app 😎. After several days of work, it didn't meet your expectations. You want to revert to your previous codebase and start over. Without version control systems, you'd have to manually delete various lines and files, which is tedious and error-prone. A VCS like Git gives you a simple command that will help you revert to your previous codebase instantly. This is just like being able to load your old game state and play again!

Lack of a Collaboration System: The Pendrive Problem

Illustration of collaboration before version control systems, where developers share code using a pendrive, wait for each other to finish, and lack version history, parallel work, and conflict resolution.

You realize you cannot implement this new feature alone and decide to bring in your friend, who just completed his calculator app 😎. You zip the entire codebase and share it via pendrive or email. Your friend makes changes and returns it the same way. The problem? There's a high risk of code conflicts since you both might modify the same files. Additionally, there's no system to track changes from all developers, making it difficult to merge everything back into a single codebase.

Lack of Accountability

Let’s say your friend, who is trying to add a new feature to your todo app, accidentally breaks some existing features. He sends the code back to you via a pendrive or email. Meanwhile, you've made your own changes, and now you merge everything together. After merging, your app doesn’t work anymore! 😵 And there's no way to tell if it was you or your friend who broke the code! It’s like playing Call of Duty with your friends and not knowing who stole your kill 😶.

Poor Versioning

Have you ever named your app versions final, final_v2, and even final_final? Without version control systems, it was very hard to keep track of all the versions and the changes those versions had. This forced developers to do the one thing they are notoriously bad at: naming things 🫣.

Solution: Version Control Systems

Diagram showing collaboration after version control systems, where two developers manage code locally with Git and push and pull changes from a central GitHub repository, enabling version history, parallel work, and conflict resolution.

As the name suggests, a version control system is software whose primary job is to track, manage and control changes to your files, typically your source code, over time. It solves all the problems mentioned above by:

  • allowing you to revert your codebase to a previous state, like a “load game” feature

  • making collaboration easy through online platforms like GitHub

  • maintaining accountability by recording who made which changes (so you know who to blame 😉)

  • keeping track of all versions for you, so you don’t have to give your project random names anymore 😮‍💨


Git: Time Machine for Developers

Git was created by Linus Torvalds (the creator of the Linux kernel) in April 2005, as a system for managing the Linux codebase overtime. In simpler words, we can think of it as a “Code Tracker”. Git is usually used through commands in the terminal (or via GUI tools), but we’ll focus on what it does, not how yet. Git is an example of a VCS (Version Control System). There are many other VCSs out there as well, like Mercurial, Apache Subversion (SVN), and Fossil, just to name a few. However, Git is the most popular one.

It is important to understand that Git is purely a local software. This means that it is software you run locally on your computer, and it simply keeps tracks of all the changes in your code, who made what changes and when, etc. It is designed to be used by a single developer on their local machine. This makes Git only a piece of the solution. It does solve many problems, but it is not complete since you would still have to share your Git-managed codebase via a pendrive, email, etc.


GitHub: The Central Source of Truth

GitHub is an online platform built on top of Git. It is like a central place where your entire Git-managed codebase is stored. This makes it easier for other developers to simply “pull” (download) the entire codebase from the internet, make changes, and “push” (upload) the modified codebase back. GitHub is what we call a VCS Remote. And again, it is not the only one, there are other such online platforms out there like GitLab, BitBucket, GitTea, etc.


Important Note: Git ≠ GitHub

Many beginners confuse Git and GitHub thinking they are the same. However, based on the above explanations, you might have understood that they are vastly different.

Point Git GitHub
What it is A version control system A platform/service built around Git
Purpose Tracks changes in source code locally Hosts Git repositories (Git-managed codebases) online
Ownership Open source Owned by Microsoft
Problems that it solves Version Control, history tracking Collaboration, Sharing
Dependency No Dependency. Works on its own. Depends on Git to function

Analogy: If Git is the save and load game feature for your codebase, GitHub is the central server that enables you and your friends to play the game together!


Resources to Learn About Git and GitHub


Conclusion

Version Control Systems are systems built by developers for developers. Developers realized how difficult it was to manage their codebase, track changes, and work on it collaboratively, so they came up with an efficient solution. One piece is Git, which is the local system keeping track of the entire codebase. The second piece is GitHub, an online platform to host Git repositories, making it easier to work collaboratively.

Learning how to efficiently use Git and GitHub is essential for every developer today. It is not a fancy tool that developers can use to brag about, instead, it is an essential tool born out of necessity.