Guide
By Axel Antas-Bergkvist Published May 23, 2026

Version control your Ghost blog with git

For developers, the absence of real version control in a CMS is a constant low-grade discomfort. You would never edit a codebase without git underneath you — every change tracked, every state recoverable, branches for risky work — and yet a Ghost blog, which can represent years of writing, usually has nothing of the sort. The fix is not a plugin. It is to get your posts out of the database and onto disk as files, where git already does everything you want.

Why git and not Ghost’s revisions

Ghost does keep a short per-post edit history in its editor, but it is shallow by design: only the last several revisions, surfaced one post at a time, with no diffs and no whole-blog view. It was built to undo a single bad edit, not to give you a history you can reason about. Git is the opposite — it remembers every committed state of a folder forever, shows exact line-level diffs, and lets you branch, review, and roll back across the whole project at once. The only thing standing between your blog and that toolset is the fact that your posts are not files yet.

Get your posts onto disk

Specter is what turns the blog into a folder. It is a native macOS app that does two-way sync between Ghost and local markdown: every post becomes a .md file with its frontmatter — title, tags, status, feature image URL, excerpt — and edits flow both ways. If you have not connected it, start with the first-sync guide. Once your archive is on disk, point git at it.

cd ~/path/to/your/ghost-posts
git init
git add .
git commit -m "Baseline: full blog snapshot"

That single baseline commit already puts you ahead of where most blogs ever get. From here, the workflow is the one you already know from code.

The workflow

Commit before you change anything, so you always have a clean point to compare against and return to:

git add .
git commit -m "Before bulk meta-description pass"

Run your edit — by hand, with a script, or by handing the folder to an AI assistant — then read the result with git diff. This is the view Ghost never gives you: every changed line, in every post, across the whole blog, in one place. It pairs naturally with Specter’s own dry-run preview, which shows the same blast radius from the sync side before anything is written to Ghost.

For genuinely risky work, branch. Try a sweeping rewrite or a structural change on a branch, review the diff, and only merge it back to main when you are happy — exactly as you would with code. If it goes wrong, you throw the branch away and nothing reached your live site, because Specter only syncs the files as they actually are on disk.

Rolling back is the everyday safety net. To discard uncommitted changes and return to your last commit:

git checkout .

To recover an older state, find it in git log and check it out. Either way the result is real markdown again, ready for Specter to sync back up to Ghost.

Where this fits

Git on the synced folder is the foundation under several other things this site covers. It is what makes a markdown backup of your blog into a true time machine, it is how you undo any change to a post, and it is the seatbelt for every bulk AI edit you run. The discipline is always the same: commit, edit, diff, sync. Ghost stays your publishing home; git, on the folder Specter keeps in sync, finally gives your blog the history a codebase takes for granted.

Buy Specter — $49 Browse all guides