Git
Git is a free, open-source version control system that records every change made to a project's files, who made it and why, so a team can work in parallel and return to any earlier version.
Git is the tool; GitHub, GitLab and Bitbucket are services that host Git repositories online and add collaboration features such as reviews, issue tracking and automation. People often say "GitHub" when they mean Git, but a project can use Git without any of those services. Git was created by Linus Torvalds for developing the Linux kernel and has become the standard for software projects of every size.
For an owner, Git is the difference between "the website" being a set of files on one server that only one person understands, and a complete, recoverable history of the site's code that any competent developer can pick up.
How it works
A Git repository is a project folder with a hidden history attached. A developer makes some changes, then saves them as a commit: a snapshot of the files with a short message explaining the change, the author and the time. Commits form a timeline, and any commit can be inspected, compared with another or restored.
Branches let work happen in parallel. A developer creates a branch to build a new feature without disturbing the main version, then merges it back once it is ready and reviewed. If two people changed the same lines, Git flags a conflict for a person to resolve rather than silently choosing one.
Every copy of a repository holds the full history, so the laptop of each developer and the hosted copy online are all complete backups of the code. Git is designed for code and text. It does not replace a backup of the database or of uploaded images, which usually live outside the repository, and it handles very large media files poorly without add-ons.
Example
A developer updates the booking form on a restaurant's site and the change goes live on Friday afternoon. By evening, staff notice that bookings for parties of more than six are being rejected. Because the site is in Git, the developer can see exactly which lines changed in Friday's commit and reverse that one commit, restoring the previous form within minutes while leaving other recent changes in place.
On Monday the fix is built on a separate branch, tested on a staging site and merged. The commit history now shows the original change, the reversal and the fix, each with a note, so anyone joining the project later can see what happened and why.
Why it matters for your business
Git protects you against two common risks: a bad change that cannot be undone, and dependence on one developer. If your site's code is in a Git repository under an account your business owns, you can hand it to a new developer, see what has changed and when, and roll back mistakes quickly. It costs little or nothing to use. Ask whoever builds or maintains your site where the repository is, make sure you have owner access to it, and check it is still being updated. Sites edited entirely through a CMS admin may not need Git for their content, but their custom code still does.
Common mistakes
- Letting the only repository live in a freelancer's personal account, so the business loses access when they leave.
- Committing passwords or API keys into the repository, where they stay in the history even after being deleted.
- Editing files directly on the live server so the repository no longer matches what is running.
- Assuming Git backs up the database and uploaded media when it only holds the code.
Questions people ask
What is the difference between Git and GitHub?
Git is the version control software that tracks changes in a project. GitHub is a hosting service for Git repositories with extra features such as pull requests, issue tracking and automated workflows. GitLab and Bitbucket are similar services. You can use Git without any of them.
Does a small business website need Git?
If the site has custom code, yes, because it makes changes reversible and the project transferable between developers. A site built entirely in a hosted website builder may not, because the platform keeps its own history. For WordPress, themes and custom plugins benefit from Git.
How do I check if my website is in Git?
Ask your developer for the repository address and access. A hosted repository on a service such as GitHub shows the list of commits with dates and messages. If nobody can show you one, assume the live server holds the only copy of the code.