Quick Reference Overview

Use this page when you already understand the workflow and need to quickly find a command, concept, or deployment step.

The reference is organized around the major stages of the PageDeploy workflow:

AreaReference
GitRepository, staging, commits, branches, and history.
GitHubRepository, push, pull, Pull Requests, and merging.
Cloudflare PagesPreview and production deployments.
DomainCustom domain and DNS workflow.
TroubleshootingCommon problems and recovery steps.
Use this page as a reference

If you are learning the workflow for the first time, follow the chapters in order. Use this page later when you need to quickly look up a command or process.

Start a Feature

Use a feature branch when starting a new piece of work. This keeps the new work separate from the production branch while you develop and test it.

Start from the latest main

git switch main
git pull

Updating your local main branch first helps ensure that the feature branch starts from the latest available version.

Create the feature branch

git switch -c feature/menu

Replace feature/menu with a descriptive name for your feature.

Confirm the branch

git branch

Git marks the currently active branch with an asterisk.

  main
* feature/menu
Quick pattern
git switch main
git pull
git switch -c feature/name

Quick Reference

CommandPurpose
git switch mainSwitch to the main branch.
git pullUpdate local main from the remote repository.
git switch -c feature/nameCreate and switch to a new feature branch.
git branchDisplay local branches and identify the current branch.

Save Work

Once you have made changes on your feature branch, review, stage, and commit the work.

Check your changes

git status
git diff

Stage the changes

git add .

Review the staged changes before creating the commit.

git diff –staged

Create the commit

git commit -m “Add coffee menu section”

Use a short, meaningful message that describes the change made by the commit.

Confirm the commit

git status
git log --oneline
Save work pattern
git status
git diff
git add .
git diff --staged
git commit -m "Describe the change"
git status

Quick Reference

CommandPurpose
git statusCheck the current repository state.
git diffReview unstaged changes.
git add .Stage changes for the commit.
git diff –stagedReview staged changes.
git commit -m “message”Save staged changes as a commit.
git log –onelineConfirm recent commits.

Push

Push sends your local commits to the corresponding remote branch on GitHub.

First push of a feature branch

When pushing a feature branch for the first time, connect the local branch to its remote branch with -u.

git push -u origin feature/menu

After the upstream relationship has been established, future pushes can normally use:

git push

Push later commits

After making and committing additional changes on the same feature branch:

git add .
git commit -m "Update coffee menu"
git push

Confirm the branch before pushing

git branch
git status

Make sure you are pushing the branch that contains the changes you intend to share.

Push does not create a commit

git push sends existing local commits to GitHub. It does not save uncommitted changes. Commit your work first.

Push workflow

git status
git add .
git commit -m "Describe the change"
git push

Quick Reference

CommandPurpose
git push -u origin feature/menuFirst push of a feature branch and set its upstream.
git pushPush committed changes to the configured remote branch.
git branchConfirm the current branch before pushing.
git statusCheck the repository state before pushing.

Preview

After pushing a feature branch to GitHub, Cloudflare Pages can create a preview deployment for that branch. Use the preview to test the changes before merging them into main.

Push the feature branch

git push

Confirm that the latest commit is visible on the feature branch in GitHub.

Open the Cloudflare preview

Open the Cloudflare Pages project and locate the preview deployment associated with the feature branch.

Open the preview URL and test the changes as they would appear in the deployed site.

Test the preview

Check the areas affected by your changes and also verify that existing parts of the website continue to work.

  • Navigation and links
  • Page layout
  • Images and assets
  • Responsive behavior
  • Forms or interactive elements

Make another change

If you find a problem, fix it locally, commit the change, and push the feature branch again.

git add .
git commit -m "Fix menu layout"
git push

The updated branch can then produce an updated preview deployment.

Preview before production

Treat the preview as the final testing point before the feature is merged into main.

Quick Reference

StepAction
Pushgit push
VerifyConfirm the latest commit exists on GitHub.
PreviewOpen the Cloudflare preview deployment.
TestVerify the feature and existing functionality.
FixCommit and push additional changes if necessary.

Merge

After the feature has been tested in the Cloudflare preview deployment, merge the feature branch into main through a GitHub Pull Request.

1. Create the Pull Request

On GitHub, open the repository and create a Pull Request with:

  • base:main
  • compare: your feature branch

Review the changed files and confirm that the Cloudflare preview deployment is working correctly.

2. Merge the Pull Request

Once the changes are ready, merge the Pull Request into main.

feature/menu
      ↓
  Pull Request
      ↓
     main

3. Update Local main

After the Pull Request has been merged, switch back to your local main branch and pull the latest changes.

git switch main
git pull
Important

The feature branch is merged into main only after the feature has been reviewed and the preview deployment has been checked.

Quick Merge Workflow

StepAction
1Create Pull Request
2Compare feature branch with main
3Review changes
4Check Cloudflare preview
5Merge Pull Request
6Run git switch main
7Run git pull

Update Local main

After a feature has been merged into main, update your local copy of main so it matches the remote GitHub repository.

1. Switch to main

git switch main

2. Pull the Latest Changes

git pull

This downloads the latest commits from GitHub and updates your local main branch.

3. Verify the Branch

git status
git log --oneline

Confirm that you are on main and that the latest merged commit is present.

Complete Update Workflow

git switch main
git pull
git status
git log --oneline
Why this matters

Keeping your local main branch synchronized with GitHub gives you a clean starting point for the next feature.

Quick Reference

CommandPurpose
git switch mainSwitch to the main branch.
git pullDownload and apply the latest changes from GitHub.
git statusCheck the current branch and working tree.
git log –onelineView recent commits.
Support PageDeploy with a coffee