Andrew's IT & Linux Blog

Linux • Networking • Systems • Cloud

My Basic Git Workflow for Updating a Website

Published: September 20, 2026

When I update my website, I use Git to track my changes, save checkpoints, and push the finished updates to GitHub.

1. Edit and Test Locally

I make changes to my HTML and CSS files in VS Code, save them, and preview the website locally before pushing anything.

2. Check What Changed

git status

This shows which files have been modified.

3. Stage the Changes

git add .

This stages all current changes so they can be included in the next commit.

4. Create a Commit

git commit -m "Describe the changes"

A commit creates a saved checkpoint in the project's Git history.

5. Push to GitHub

git push

This sends my local commits to the GitHub repository.

Working With a Separate Branch

If I make changes on a separate branch, I merge that branch into main when the changes are ready.

git checkout main
git pull origin main
git merge branch-name
git push origin main
Basic Workflow: Edit → Test → Stage → Commit → Push → Merge → Deploy

Deployment

Once the main branch is updated on GitHub, Cloudflare automatically deploys the newest version of my website.

Key Concepts:
Saving changes updates the files on my computer.
Committing creates a Git checkpoint.
Pushing sends those commits to GitHub.