Software & B2B
Version control for websites: every state traceable
Many people know version control only from software development. For websites it is just as valuable: every change is documented, every live state is tagged, and several teams do not get in each other’s way.
In short
- Every change is made on its own branch; the main branch remains the reviewed state.
- Tags mark every published state and are never moved or deleted.
- Simple, technically enforced rules prevent anyone from working directly on the main branch.
What it is about
On many websites nobody knows exactly who changed what and when. A text was adjusted, a script added, a redirect removed. If something is wrong afterwards, the search begins. And if two people work on the same page at the same time, one overwrites the other’s changes.
Version control with Git solves this. Every change is saved as a step with a description, person and time. Every earlier state can be restored. For websites built from files, this is particularly easy, and it pays off from day one.
How it works
The main branch contains the reviewed, approved state. Every new piece of work, whether a new page, a new language or a security fix, is created on its own branch. That is where building and testing happen. Only after approval is the branch merged into the main branch, in a way that keeps the step visible as its own section in the history.
Every published state gets a tag, a fixed marker with a date. Tags are never moved or deleted, so it always remains clear what was live at which point in time. For approval documents and contract terms, a version number following semantic versioning is also useful. And because several teams or service providers may work on the same project, each works on its own branches, ideally in separate working copies.
Where it goes wrong
The most common mistake is the shortcut. A small fix is made directly on the main branch, without review. Then a second one. At some point, the main branch is no longer the reviewed state. A proven approach is to block such commits technically, for example with a hook that rejects them.
A second risk is concurrent work. When two teams build packages in parallel, the current main branch has to be read again before every merge, because another team may have merged something in the meantime. Merges should therefore always happen one at a time and never by force, meaning without force-push or rewritten history. And finally, credentials, customer data and large raw files do not belong in the repository.
How to proceed
Store your website’s sources in a Git repository from the start, one you have access to yourself. Develop every change on its own branch. Technically block commits on the main branch. Mark every live state with a tag. Write short, concrete commit messages in your team’s language. Merge only after approval and one at a time. And train everyone involved in these few rules, because they only work if everyone follows them.
Read more: Commissioning a software project properly: requirements, acceptance, source code, Rollback: every change needs a way back and Handovers and operations documentation: so knowledge does not depend on one person.
How Airnite helps
We set up a Git repository for your website or software with clear branch, tag and approval rules and enforce them technically. In training sessions, we show your team the process on your own project, so that several teams and service providers can also work cleanly in parallel.
Checklist
Sources
Every fact in this article is based on the following publications. Primary sources are marked.
- git-scm.comPro Git (book)
- git-scm.comgit-tag Documentation
- semver.orgSemantic Versioning 2.0.0
Matching services
Read on
Commissioning a software project properly: requirements, acceptance, source code
Many software projects do not fail on code but on the first sentence: “We'd like something like …”. Settle requirements, acceptance and rights at the start and you save months and nerves at the end.Websites3 minRollback: every change needs a way back
Backups protect against attacks and hardware failure. The more common case, a failed update, needs something else: a planned and rehearsed way back to the last working version.Software & B2B3 minHandovers and operations documentation: so knowledge does not depend on one person
Many IT processes work because one person knows how. If they are absent or the service provider changes, the guessing begins. Good handovers make knowledge independent of individuals.Current incidents and warnings are covered in the Zero Day magazine. Go to the magazine