Skip to content
TurnIntoCMS

Writing commit messages for content changes

By Yash Garg · · 7 min read

A clean content commit isolates text edits from application code, uses an imperative subject line under 50 characters, explains the business motivation in the commit body, and attributes the actual writer. Following this pattern gives your repository an audit log that both engineers and clients can understand. When non-technical stakeholders ask who revised a paragraph or why a price changed, clear commit logs supply the answer immediately without forcing developers to dig through chat threads.

The short answer: how to structure content commits

Commit messages must answer what changed and why, because the Git diff already shows the raw text edits. According to Google's engineering practices for change descriptions, the message serves as a permanent historical record for future maintainers who need context that code cannot provide on its own.

Content edits should always remain atomic. If you modify landing page marketing copy in the same commit that refactors a navigation component or adjusts utility classes, you create review friction. Keeping copy changes isolated lets your team review, cherry-pick, or revert content updates without touching functional logic.

Keep your subject line under 50 characters so it remains legible across terminal pagers and web interfaces. Insert an empty line, and wrap the commit body at 72 characters, as recommended by TheServerSide's guide on Git commit message guidelines.

Choose a semantic type and an imperative subject line

Standardizing commit prefixes across your project keeps repository logs clean. The Conventional Commits specification provides a structured format of type, optional scope, and description that teams can extend. While the base standard reserves the docs type for technical software documentation, agencies managing client websites should introduce custom non-breaking types such as content or copy.

Using a content prefix creates a clear distinction between internal developer documentation, such as updating setup instructions in a project readme, and public-facing marketing copy. Adding a scope narrows the change to a specific route, page, or component, which is especially helpful when you let clients edit Next.js pages directly.

Write your subject line in the imperative mood, following the rule highlighted in TheServerSide's Git commit conventions: a good subject line should always complete the sentence, "If applied, this commit will...".

Subject Line TypeExample Commit HeaderEvaluation
Bad (Past Tense)updated pricing textMissing scope, lacks imperative mood, reveals no intent.
Bad (Vague)content: fixesUnclear scope, leaves maintainers guessing what was fixed.
Acceptabledocs(pricing): change tier pricesUses default types, but blurs site copy with developer docs.
Recommendedcontent(pricing): update enterprise seat limitsClear custom type, precise scope, imperative, and under 50 characters.

Document editorial intent and business reasons in the body

A commit body should never simply restate the diff. Writing that you changed a price from 20 dollars to 25 dollars is redundant because running a diff command shows that numeric change immediately. Instead, use the body to record the editorial strategy, legal requirements, or marketing goals behind the update.

This approach follows the principle of Chesterton's fence, which Google's changelist guide applies to software modifications: reading source code may not reveal why it exists, which makes it harder for future developers to know whether they can move Chesterton's fence. Documenting business context stops other team members from accidentally reverting intentional legal or branding phrases during routine updates.

Here is an example of an unhelpful, diff-echoing message:

content(terms): update arbitration section Replaced paragraph 4 with new sentences sent over Slack.

Here is that same update written with editorial context:

content(terms): update arbitration clause for 2026 compliance Reflect updated dispute resolution guidelines required by outside legal counsel for the Q1 policy review. Replaces standard state arbitration terms with the revised class-action waiver.

Attribute authorship with native Git flags and trailers

When you receive copy edits through chat channels, an email, or a shared document, committing those changes under your own Git identity pollutes history queries. Months later, other developers will contact you about copy decisions you did not write. Git handles this through two native identity fields: Author (the person who created the content) and Committer (the person or tool executing the Git command).

When committing text on behalf of a client or marketing strategist, pass the native author flag in your terminal:

git commit --author="Jane Doe " -m "content(about): update executive leadership bios"

For joint work where you built the component structure while the client drafted the copy, use standardized trailers based on RFC 822. The Git toolset includes the git-interpret-trailers command to help parse key-value metadata placed at the bottom of messages.

Platform hosting services like GitHub support the co-authored trailer format. Without this spacing, hosting tools treat the metadata as plain paragraph text rather than contributor data.

If your client prefers to keep their personal email address private, ask for their platform-assigned no-reply address, for example, 123456+username@users.noreply.github.com. Using that address inside the trailer preserves author attribution on commit graphs without exposing private contacts in public logs.

Handling attribution in visual editors and Git-based tools

Automated tools and CMS setups handle author attribution differently. In Git-based CMS options such as Decap CMS, content is stored in your Git repository alongside code, as noted in the Decap CMS documentation. If you do not configure individual user credentials or OAuth proxying, every content edit will show up under a single generic bot identity, such as Netlify CMS or GitHub Actions. This erases your audit history and makes rollbacks confusing.

Similarly, TinaCMS documentation explains that TinaCMS commits every save back to the Git repository where content lives in Markdown, MDX, or JSON files. When teams configure these platforms, they often connect them via automated GitHub Apps. As noted in GitHub's documentation on creating GitHub Apps, apps can be granted access to specific repositories with narrow, specific permissions.

On GitLab, teams can configure automated commit templates. According to GitLab's merge request commit templates documentation, the platform supports the co-authored-by template variable. For squash and merge commits, GitLab evaluates up to the 100 most recent commits in the merge request and skips commit bodies exceeding 100 KiB during aggregation, preserving contributor credit in the target branch automatically.

If you want a lightweight workflow without installing a full CMS, visual tools like TurnIntoCMS provide an in-browser editing layer for Next.js, React, and Vite sites. Clients click text or images directly on a live preview of the site. TurnIntoCMS connects to GitHub, creates a single clean Git commit for each publish event, and tags the commit with the client's name. This gives your agency clean attribution without requiring clients to install Git or manage terminal commands. If a client makes an error, you can follow standard practices for Git commit rollbacks on client edits to revert that single commit safely.

TurnIntoCMS is free for one project, but it has defined boundaries. It works only with GitHub repositories, so teams on GitLab or Bitbucket need alternative workflows. It is also not a page builder: clients edit existing text, images, and lists rather than building new layouts from scratch.

Common content commit mistakes and a copyable template

Avoid these common content commit errors:

  1. Bundling code refactors with copy updates. When marketing copy is combined with layout adjustments, you cannot easily revert copy errors without breaking your design.
  2. Missing the blank line before trailers. Omitting the empty line causes GitHub and GitLab to parse contributor lines as standard body text instead of metadata, failing to link the collaborator's profile.
  3. Writing vague single-word subject lines like "typo" or "update". These entries force developers to dig through raw file diffs during audit checks.
  4. Using developer-only identities for legal or marketing copy. If regulatory questions arise, engineering should not be the sole recorded author.

Use this copyable template for client content updates:

type(scope): imperative summary under 50 chars Explain the business reason, campaign, or legal requirement. Wrap body text lines cleanly at 72 characters. Co-authored-by: Client Name

FAQ

What Conventional Commit type should I use for website content?

Use content or copy if your team configures custom types in your commit linter, which keeps public marketing edits distinct from software documentation. If your project strictly enforces default rules without custom types, use the standard docs type.

What is the difference between git commit --author and Co-authored-by?

The author flag updates Git's internal primary author field, indicating the person who formulated the change when another person executes the commit. The co-authored-by trailer credits additional contributors alongside the primary author using standard message trailers.

How do I protect a client's private email when adding co-author trailers?

Use the client's official platform no-reply email address, such as username@users.noreply.github.com. This attributes the work to their account profile without exposing their real email address in public commit logs.

Why is GitHub not recognizing the Co-authored-by trailer in my commit?

GitHub requires at least one blank line, and its documentation recommends two blank lines in raw command-line prompts, between the body text and the trailer block. Without this spacing, the parser treats the trailer as regular body copy.

Sources

  1. Git - git-interpret-trailers Documentation (git-scm.com, checked November 19, 2026)
  2. Conventional Commits (conventionalcommits.org, checked November 19, 2026)
  3. Commit message templates (docs.gitlab.com, checked November 19, 2026)
  4. Git commit message conventions and best practices (theserverside.com, checked November 19, 2026)
  5. Writing good CL descriptions (google.github.io, checked November 19, 2026)
  6. Decap CMS overview (decapcms.org, checked November 19, 2026)
  7. Get Started and learn about TinaCMS (tina.io, checked November 19, 2026)
  8. About creating GitHub Apps (docs.github.com, checked November 19, 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