Skip to content
TurnIntoCMS

Git commits and rollbacks as a safety net for client edits

By Yash Garg · · 6 min read

Client edits are safe when every change is a Git commit, every commit gets a preview before it goes live, and you know the two ways back: roll back the deployment in your host to fix the live site, then revert the commit in Git so the mistake doesn't return on the next deploy. Commits tell you what changed, previews catch most problems early, and rollbacks cover the rest.

Below: each layer, how Vercel, Netlify and Cloudflare differ, and a runbook for the day a client publishes something broken.

The four layers of the safety net

LayerWhat it protects againstWhere it lives
Commit historyNot knowing who changed what, or whenYour Git repository
Preview deploymentsA broken change reaching the live siteYour host
Host rollbackA broken live site right nowYour host's dashboard or CLI
Git revertThe same mistake coming back on the next deployYour Git repository

A rollback without a revert only fixes the site until the next push. A revert without a rollback leaves it broken while the new build runs.

Layer 1: commit history

When every client edit is its own commit, the repository answers the first question after any incident: what changed? The Pro Git book shows how to filter the log by author and search for a string with the --author and -S options, to find the commit that changed a price or deleted a sentence.

That only works if edits are small: one change per commit, or a tool that commits once per publish. TurnIntoCMS, for example, writes each publish as one commit whose message lists the changes and names the client who made them.

Commit message conventions for client edits

Git's documentation suggests starting a message with a single short line of no more than 50 characters, then a blank line and a longer description. For client work, add a prefix that separates content from code. The Conventional Commits specification uses a type, an optional scope and a description, and it allows types other than fix and feat.

An example convention:

ChangeExample message
Client copy editcontent(home): update hero headline
Client price changecontent(pricing): change Pro plan price
Client image swapcontent(team): replace photo for new hire
Your layout changefeat(pricing): add annual billing toggle
Your bug fixfix(nav): stop menu overlapping logo

The content prefix lets you list client edits with the --grep option, which searches commit messages, and it makes it obvious when a code change, not a copy change, caused a problem.

Layer 2: preview deployments

A preview is a full build of a change at its own URL, separate from production. Vercel creates a preview deployment by default when you push a commit to a branch that is not your production branch or open a pull request.

The practical setup: client edits go to a staging branch, the client checks the preview URL, and you merge once they confirm. Publish straight to production and rollback becomes your first line of defence instead of your last.

Layer 3: host rollbacks

A rollback points your live domain back at an earlier build. It doesn't touch your Git history, which is why you still need a revert afterwards. Each host has its own catch.

HostHow to roll backThe catch
VercelInstant Rollback from the production deployment tileNew pushes don't go live until you promote a deployment
NetlifyPublish Deploy on an earlier successful deployWith auto publishing on, the next Git deploy overwrites the rollback
Cloudflare WorkersRollback in the dashboard or with WranglerConnected resources such as KV and D1 are not changed by the rollback

Vercel

Vercel says after a rollback it turns off auto-assignment of production domains, and Hobby users can only roll back to the immediately previous deployment. That protects you during an incident, but if nobody promotes a deployment afterwards, the client's next edits build and never appear.

Netlify

Netlify's rollback publishes a previous atomic deploy without triggering a new one, and its docs warn that with auto publishing on, any new Git-triggered production deploy overwrites the rolled-back version. Lock deploys (Netlify's way of stopping auto publishing) until the fix is in Git.

Cloudflare Workers

A Workers rollback creates a new deployment set to 100% of traffic for the version you pick, and you can only go back to the 100 most recently published versions. If your Worker reads from a database, old code against new data can fail.

Layer 4: git revert

The git revert docs describe it as a way to record new commits that reverse the effect of earlier ones. Both the bad edit and its undo stay in the log, which is what you want when a client asks what happened. The same page notes that git reset and git restore, the usual alternatives, can discard uncommitted changes in your working directory, so reach for revert first on a shared branch.

When to revert and when to roll back

SituationDo this
Live site is broken or shows wrong content nowRoll back in the host, then revert in Git
Wrong copy, but the site worksRevert only and let the next deploy fix it
Mistake found on a previewRevert or fix on the branch; nothing to roll back
Several edits since the bad one, all wantedRevert only the bad commit and keep the rest
Build fails after an editRevert, push and confirm the next build passes

Runbook: something broke after a client edit

Copy this table into your project notes:

StepActionWhy
1Confirm what is broken and on which URLA preview problem needs no rollback
2Roll back production in your hostRestores the live site without waiting for a build
3Lock auto publishing if your host needs itStops the next push from undoing the rollback
4Find the commit with git logThe content prefix and author narrow it down
5Revert that commit on the production branchFixes the source so the next deploy is clean
6Check the new preview or buildConfirms the revert didn't break anything else
7Restore normal deploysPromote a deployment on Vercel or resume auto publishing on Netlify
8Tell the client what changed and whyThey learn which field caused the problem

Common mistakes

  • Rolling back and never reverting. The bad commit returns with the next deploy. Fix: treat the revert as part of the rollback.
  • Leaving a project rolled back. Client edits pile up unseen. Fix: make step 7 mandatory.
  • Mixing client edits and code changes in one commit. Reverting the copy also reverts your feature. Fix: separate commits with a content prefix for client work.
  • Rewriting history on a shared branch. A reset and force push can lose other people's commits. Fix: revert instead, and protect the production branch as described in our guide to letting clients edit Next.js without a CMS.
  • Expecting a rollback to restore data. Code goes back, databases and storage don't. Fix: keep editable content in the repository, where a revert covers it.

For the client side of this setup, read about letting clients edit a Next.js site. If you are weighing a Git-based CMS instead, compare client editing tools or see how TinaCMS compares.

FAQ

Does a host rollback change my Git history?

No. A rollback points your domain at an earlier build and leaves the repository as it was, which is why you still revert the commit afterwards.

Should clients be able to roll back the site themselves?

Usually not. A rollback also hides every edit made after the target build, so keep it with the developer and give the client a clear way to report problems.

Is git revert safe on a shared branch?

Yes. It adds a new commit instead of rewriting existing ones, so other people's copies of the branch stay valid.

What should a client edit's commit message say?

A short first line with a content prefix, the page and the change, for example "content(pricing): change Pro plan price", with details in the body if needed.

Sources

  1. Viewing the Commit History (git-scm.com, checked November 18, 2026)
  2. git-commit Documentation (git-scm.com, checked November 18, 2026)
  3. Conventional Commits (conventionalcommits.org, checked November 18, 2026)
  4. Environments (vercel.com, checked November 18, 2026)
  5. Performing an Instant Rollback on a Deployment (vercel.com, checked November 18, 2026)
  6. Manage deploys (docs.netlify.com, checked November 18, 2026)
  7. Rollbacks (developers.cloudflare.com, checked November 18, 2026)
  8. git-revert Documentation (git-scm.com, checked November 18, 2026)

Related

More from the blog

Let your clients edit the site you coded

One website free. Then $1 each, paid once.

Get started free