Testing Blog Designs with Git Branches and GitHub Pages
I have a habit of tweaking my blog design and then immediately second-guessing myself. Does this colour scheme actually work? Is this layout easier to read, or just different? For a long time, the only way I could really tell was to push the change live and look at it in a real browser — which felt a bit reckless. Then I discovered that [GitHub Pages][1] lets you publish from any branch, not just main, and everything changed.
GitHub Pages branch deployment is a workflow that publishes a live preview of a Jekyll site from any Git branch you choose, so a design experiment can run on a real public URL without ever touching the branch that serves your production traffic. Here is the technique I now use whenever I want to compare two designs side by side before committing to one.
GitHub Pages Branch Deploys: Why Branches Work for Design Testing
Git branches are usually associated with software features or bug fixes, but they are genuinely useful for design experiments too. A Git branch is an independent line of development within a repository that lets you make changes without affecting the code on main. The idea is simple: your main branch holds the version of your blog that is live and working. You create a new branch for your design experiment, push it to GitHub, and then tell GitHub Pages to serve from that branch instead. You get a real, live preview of your experiment — fonts, layouts, colours, everything — without touching your production site.
When you are happy with the result, you merge the branch into main and delete it. If you decide the experiment was a bad idea, you just delete the branch and nothing has changed.
How to Preview a Design Change Using a GitHub Pages Branch Deploy
🔒 Subscribe to keep reading.
GitHub Pages Branch Testing: Best Practices and Common Pitfalls
🔒 Subscribe to keep reading.
GitHub Pages Branch Testing: Key Takeaways
🔒 Subscribe to keep reading.
You've hit a Deep Dive tutorial.
I spend dozens of hours researching, coding, and breaking things to write these guides. This content is free, but reserved for my subscriber community. Drop your email below to unlock this guide (and all past/future deep dives):
Full content temporarily unavailable — refresh in a moment
Already a subscriber? Use the magic link from your last newsletter, or reset your password.
Log in to unlock
New subscribers get an inbox mail: Set a password to unlock articles. The form does not log you in — use the same email afterwards.