What is Version Control?

Version control is a system for recording changes to files over time so you can compare revisions, recover recorded states and understand how a project developed. It gives changes an identifiable history instead of relying on filenames such as final, final-new and final-really-new. Developers use it for source code, but it is also useful for scripts, configuration and documentation. It does not automatically test the work, share every saved edit or deploy it to a live system.
Git is one version control system. GitHub and GitLab are examples of platforms that can host Git repositories and add collaboration features. Understanding that distinction makes the workflow much easier to follow: saving a file, committing a revision, sharing it and deploying it are separate actions.
The Techie Broadband terminology guide connects this subject with development, cloud infrastructure and networking. The infographic introduces common Git actions; the sections below explain what each action actually records or changes.

What problem does version control solve?
Suppose a home lab has a router-configuration template, a monitoring script and deployment instructions. A change fixes one issue but introduces another. Without a useful history, you may know that the files changed while having little idea which change mattered, why it was made or what a known working revision contained.
Version control lets you identify a recorded revision, inspect its changes and compare it with another. A meaningful message connects the mechanical edit to its purpose. “Change monitoring timeout after testing slow responses” is more useful than “update files”.
This is particularly valuable with infrastructure as code, where configuration describes intended infrastructure. The history can show what was requested, but the running network may still differ because of manual changes, failed deployment or external dependencies. A repository is evidence of recorded intent, not proof of current live state.
Useful things to version include:
Source code, scripts and configuration templates that contain no live secrets.
Documentation, runbooks and the reasons behind operational decisions.
Tests, dependency declarations and reproducible build instructions.
Suitable structured text, such as reviewed configuration or small reference datasets.
Large media files and application databases need more thought. They can be stored or referenced through appropriate tooling, but meaningful line-by-line comparison and merging may be limited. Version control is not a reason to commit every generated file, credential or data export.
Version control, cloud sync, hosting and backup
Cloud sync keeps selected data aligned between locations. Version control preserves deliberate project revisions and relationships between them. A sync service may also offer file history, but that does not make it equivalent to a source-control workflow with commits, branches and review.
Concept | Main responsibility | What it does not establish |
|---|---|---|
Version control system | Record and compare project revisions | That each revision works or is deployed |
Repository hosting | Make repositories available with access and collaboration features | That all local changes have been uploaded |
Pull or merge request | Propose a change for review on a hosting platform | That Git itself requires this review process |
Cloud sync | Align selected data under a sync policy | A deliberate, tested project history |
Backup | Preserve recoverable data under a recovery policy | That working revisions have been reviewed |
Deployment | Apply a chosen build or configuration to an environment | That saving or committing a file caused it |
A push can trigger an automated deployment if you have configured one. That is a connection between systems, not an inherent property of every repository. A project can also use Git entirely on one computer without a hosting account.
Local, centralised and distributed version control
A local version control system retains history on one machine. A centralised system, such as Subversion, uses a central repository as the authority for recorded revisions; clients work with selected checked-out content. In a distributed system such as Git, local repositories can record history and exchange it with other repositories.
For Git, that means you can usually inspect the history you already have, compare revisions and make commits without an internet connection. Sharing with an internet-hosted remote requires connectivity. A shallow clone contains a restricted depth of history, while a partial clone can omit some objects until needed, so do not assume every clone contains everything offline.
Distributed does not mean ungoverned. A team can nominate one hosted repository as its shared authority and require review or automated checks before accepting changes. Those policies sit above the ability to create local commits.
The Git terms that matter
Term | Meaning in a normal Git workflow | Practical implication |
|---|---|---|
Repository | Recorded objects, history and references | Usually associated with a .git directory in a working checkout |
Working tree | Files you currently edit | Saved changes can remain uncommitted |
Index or staging area | Content prepared for the next ordinary commit | It can differ from both working files and the last commit |
Commit | An identified project snapshot with metadata and parent relationships | It records selected content locally |
Branch | A named reference to a line of development | It is not a separately copied folder tree |
Tag | A reference commonly used to name a release or other significant point | Release names should be managed deliberately |
Remote | Another repository configured as a source or destination | It can be on a server or simply elsewhere on the same computer |
Git's snapshot model describes the project state, rather than a folder containing only the most recently edited files. Unchanged content can be reused internally; a snapshot does not imply a fresh uncompressed copy of every file for every commit.
A commit normally refers to a tree of recorded files and to its parent commit or commits. Its identifier depends on the recorded commit object, including its history context and metadata. Changing an earlier commit creates different history rather than editing that same identified object in place. References can still be moved and unreachable objects can eventually be removed, so this is not an everlasting archive by itself.
Author names, email addresses and messages are metadata. They do not automatically prove who performed an action or that the content is trustworthy. Access controls, review, signing policies and audit records address different parts of that trust problem.
Save, stage, commit and push are different
Saving writes a file in the working tree. Staging chooses content for the next ordinary commit. Committing records that staged state in your local repository. Pushing transfers the required committed objects and requests updates to selected references in another repository, subject to its permissions and policies.
The subtle point is that staging selects the content as it exists at that moment. Editing the file afterwards does not silently replace the staged content. The Git add manual documents this behaviour and explains that subsequent edits must be staged again if you want them included.
Techie Broadband test: which version was actually recorded?
We tested this with Git 2.51.1 in fresh, disposable local repositories. A bare repository on the same computer acted as the remote; no hosted service or internet connection was used. These are synthetic file contents, not measurements of a production development system.
We first committed and pushed a file containing version1. We then saved version2, staged it, saved version3 without staging again and made an ordinary commit.
Location | After the local commit | After pushing that commit |
|---|---|---|
Working file on disk | version3 | version3 |
File in the new local commit | version2 | version2 |
File on the remote main branch | version1 | version2 |
The push shared version2, not the newer saved version3. This is correct Git behaviour. It is also why “I saved it” and “I committed it” answer different questions. Review the staged diff before committing and the intended branch before pushing.
In an existing practice repository, these inspection commands help distinguish the states:
git statusgit diffgit diff --stagedgit log --oneline -5
The default git diff compares working content with the index; git diff --staged compares the index with the current commit. A blank ordinary diff does not prove there is nothing staged. New untracked files also need attention in git status.
For a harmless example.txt that you deliberately want to record, the ordinary sequence is:
git add example.txtgit diff --stagedgit commit -m "Explain the example change"
These commands assume Git is installed, you are inside a repository and an appropriate author identity is configured. Use explicit paths while learning rather than stage an entire unknown tree. The example does not push anything or alter global Git settings.
Fetch, pull and push
Fetching obtains selected remote objects and references so you can inspect newly available work. In the normal workflow it does not integrate that work into your current branch. Pull combines fetching with an integration step according to the selected policy, such as merging or rebasing, with fast-forward restrictions where configured.
Pushing shares committed history and requests a remote-reference update. It does not upload every unstaged file sitting beside the repository. A rejected push can indicate permissions, branch policy or a remote history that has moved on. Forcing an update is not a general-purpose fix.
How branches and merges work
A branch gives a line of work a name. Starting a branch from an existing commit gives both lines shared ancestry; new commits can then move their tips independently. A default branch named main is a convention used in this article, not a requirement of Git.
When one tip is already an ancestor of the other, a fast-forward can move the branch reference along that existing history. When work has diverged, a merge can use the two tips and their common ancestor to construct a combined result. A merge commit has multiple parents. Not every merge operation creates one.
The Pro Git branching and merging chapter explains these relationships and textual conflicts. If the same area was changed incompatibly, Git can pause for a person to resolve it. Resolving markers and staging the result tells Git that the conflict is addressed; it does not prove the application behaves correctly.
Techie Broadband test: a clean merge can fail the real requirement
We ran a second isolated test with a fictional service.conf file. The example had two relevant settings separated by unchanged comment lines. Nothing was deployed, and no service or network listener was started.
The initial state bound the fictional service to 127.0.0.1 with authentication required. One branch changed the bind address to 0.0.0.0, leaving authentication enabled. The other disabled authentication, leaving the service restricted to the local address. The explicit test policy prohibited combining an all-IPv4-interface bind with disabled authentication.
Revision | Listen address | Authentication required |
|---|---|---|
Common starting point | 127.0.0.1 | true |
Remote-access branch | 0.0.0.0 | true |
Local-only branch change | 127.0.0.1 | false |
Automatically merged result | 0.0.0.0 | false |
Git completed the merge with exit status 0, no unmerged entries and a merge commit with two parents. Our policy check failed because the combined settings violated the stated requirement. The test demonstrates a logical conflict even though Git found no textual conflict. In a real application, actual reachability would also depend on its binding behaviour, firewall, routing and other controls.
For comparison, another fixture changed the same port line differently on two branches. Git returned exit status 1 with unmerged entries and conflict markers. One result required a person because the text conflicted; the other required a test because the meaning conflicted. Both need review.
This is where continuous integration becomes useful: automated checks can assess the combined revision before it is accepted or deployed. Tests still need to cover the actual requirement. A green test suite that never checks the relationship between exposure and authentication would miss this example.
Merge, rebase and review
A rebase replays a line of work onto another base, creating replacement commits and therefore different identifiers. It can be useful under an agreed workflow, but rewriting history that others already depend on needs coordination. A pull request or merge request is a platform review mechanism, not another name for a Git branch or a Git merge.
Keep changes focused enough to review and explain. The objective is a revision that can be understood, tested and recovered, rather than the largest possible number of commits or branches.
Recovering a recorded version safely
Restoring a file, reverting a commit and resetting history are different operations. First identify whether you need to recover uncommitted work, inspect an older state, reverse a published change or rewrite a private line of work. Preserve valuable local changes before choosing an operation.
Git revert records a new commit that reverses the relevant change, subject to conflicts and context. In our disposable test, a baseline containing A was followed by a commit changing it to B. Reverting that change restored A and left three reachable commits: baseline, change and revert. The original B commit remained recorded.
That preserves an explanation of what happened. It does not purge a secret, undo a database migration automatically or restore files that were never recorded. Reverting a merge also has specific ancestry consequences, so do not treat it as interchangeable with reverting any ordinary commit.
Avoid copying destructive reset, clean or force-push commands into a repository merely to clear an error. A convenient command that discards the only copy of work is not recovery. When unsure, preserve the current files and establish the intended history before proceeding.
Version history is not a complete backup plan
A remote copy of committed history helps if a laptop fails. However, uncommitted changes, ignored files, external assets and hosting-platform data may be missing. A downloaded source ZIP is not the same as a repository with its history. A shallow or partial clone also has deliberate limitations.
Git Large File Storage adds another distinction. GitHub's documentation explains that Git LFS stores pointer files in the repository while the large contents are stored separately. Keeping the pointers without the required objects is not sufficient to recover the actual assets. Submodules likewise refer to other repositories whose required revisions must remain available.
Define what recovery needs: repositories and references, required large-file objects, dependencies, build configuration, secrets restored through their own secure mechanism, and relevant platform settings or discussions. Test recovery instead of assuming that any clone or exported archive contains the whole operational project.
Secrets, access and repository hygiene
A .gitignore file helps keep intentionally untracked paths out of normal additions. It does not stop Git tracking a file already in the repository and does not erase its previous revisions. Deleting a password from the latest file is therefore not the same as invalidating it or removing it from history.
GitHub's sensitive-data guidance says to revoke or rotate an exposed credential first. History cleanup requires coordination because copies can remain in clones, forks or other references. A history rewrite alone cannot withdraw a credential already copied by someone else.
Keep live credentials, private keys, customer records and unnecessary machine-specific data outside ordinary project history. Use approved secret handling, access controls and appropriate scanning. A private repository reduces visibility; it does not remove the consequences of committing a secret or sharing access too widely.
Repository permissions and automation permissions also matter. Review who can update important branches, change build workflows or access deployment credentials. A trustworthy-looking commit message is not a substitute for those controls.
Does version control need fast broadband?
Local Git work usually does not. Reading already available history, making commits and comparing local revisions can continue through an outage. Cloning from a remote service, fetching new objects, pushing commits and obtaining missing LFS or partial-clone content need access to their source.
For a UK home lab or remote-working connection, upload speed matters when sending repository data outward; download throughput matters when retrieving it. Check the actual ISP, access network, product and location rather than infer upstream capacity from an advertised download rate or an FTTP label.
Techie Broadband calculation: assume an operation actually needs to send 500 MB of decimal payload. That is 4 billion bits. At a constant 20 Mbps payload rate, the transfer floor is 200 seconds, or 3 minutes 20 seconds. At 100 Mbps it is 40 seconds. These are illustrative transfer times, not measurements of Git hosting or broadband packages.
Actual Git transfers exchange required objects, with compression and possible reuse, so a 500 MB working folder does not establish a 500 MB push. A small source-code edit may transfer little; large new binary content or a long initial history can change that. Service limits, local packing CPU, storage, WiFi, router capabilities and the wider path can also constrain performance.
Do not add large generated outputs or changing media to ordinary history without a reason. Consider the review, storage, clone and recovery consequences as well as the first upload. Git LFS or a separate artefact store may suit some workloads, with their own access and retention requirements.
A practical workflow for a small project
Confirm the repository, branch and intended change. Check current status and preserve unrelated work before switching context.
Use the agreed branch workflow and inspect incoming work before integrating it. Check the configured remote and upstream rather than assume their names.
Make a focused change and run the relevant checks. Review both the individual edit and how it interacts with the rest of the configuration.
Stage the intended content explicitly, inspect the staged diff and check for secrets or generated files.
Commit with a message explaining the change and its purpose. Confirm the recorded revision contains what you meant to include.
Push to the intended destination and use the agreed review and integration process. Verify the remote result rather than infer it from a local commit.
Test the integrated revision and, if deployment is required, verify the target environment separately. Record enough information to connect the live result with the approved revision.
Troubleshooting common version control problems
A saved change is missing from a commit: inspect status and staged content. It may have been edited after staging, left untracked or excluded.
A commit is missing from the host: check the local branch, intended remote and push result. A local commit does not establish a remote update.
Push is rejected: read the reason. Inspect permissions, branch policy and incoming history; do not force-push simply to remove the rejection.
Merge reports a conflict: preserve needed work, inspect the affected paths and understand both changes before resolving. Test the resulting content afterwards.
Merge succeeds but behaviour fails: inspect dependencies and semantic relationships, not only conflict markers. Compare the integrated revision with the last known acceptable result.
Earlier history or large assets are missing: check shallow/partial clone settings, LFS retrieval, submodules and access to the required remote objects.
Check the exact repository and current branch before acting. It is easy to diagnose the wrong checkout when several projects or worktrees exist. Use inspection to establish the state before choosing a recovery command.
Frequently asked questions
Is version control only for programmers?
No. It can also track scripts, configuration, documentation and other suitable files. Text formats are generally easier to compare and merge meaningfully than opaque binary formats, and secrets should be kept out of ordinary history.
Is Git the same as GitHub?
No. Git is a version control system that can operate locally. GitHub is a platform that hosts Git repositories and adds features such as access control, review and automation.
Does committing a file upload it?
An ordinary Git commit records selected content in the local repository. A separate push shares committed history with a configured remote, subject to permissions and policy. Unstaged working edits are not automatically included.
Can I use Git without the internet?
Yes, for operations using objects already available locally, including ordinary commits and many comparisons. Remote exchanges and missing content from partial clones or large-file storage still need access to their source.
Does a successful merge mean the change is correct?
No. Git can combine non-conflicting text into a logically incorrect result. Review and tests must check the integrated behaviour and the requirements that matter to the application or configuration.
Can version control replace backups?
It helps preserve recorded history, especially when shared elsewhere, but may omit uncommitted work, external assets and platform data. Define and test a recovery plan that includes everything required to restore the project.
The key takeaway
Version control makes changes traceable and recoverable when you record the right content and retain the required history. Its value comes from connecting each revision with a reason, checking the combined result and verifying what was shared or deployed. A commit records a state; the surrounding workflow determines whether that state is useful and safe to use.

