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:
| Area | Reference |
|---|---|
| Git | Repository, staging, commits, branches, and history. |
| GitHub | Repository, push, pull, Pull Requests, and merging. |
| Cloudflare Pages | Preview and production deployments. |
| Domain | Custom domain and DNS workflow. |
| Troubleshooting | Common problems and recovery steps. |
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
git switch main git pull git switch -c feature/name
Quick Reference
| Command | Purpose |
|---|---|
git switch main | Switch to the main branch. |
git pull | Update local main from the remote repository. |
git switch -c feature/name | Create and switch to a new feature branch. |
git branch | Display 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
git status git diff git add . git diff --staged git commit -m "Describe the change" git status
Quick Reference
| Command | Purpose |
|---|---|
git status | Check the current repository state. |
git diff | Review unstaged changes. |
git add . | Stage changes for the commit. |
git diff –staged | Review staged changes. |
git commit -m “message” | Save staged changes as a commit. |
git log –oneline | Confirm 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.
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
| Command | Purpose |
|---|---|
git push -u origin feature/menu | First push of a feature branch and set its upstream. |
git push | Push committed changes to the configured remote branch. |
git branch | Confirm the current branch before pushing. |
git status | Check 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.
Treat the preview as the final testing point before the feature is merged
into main.
Quick Reference
| Step | Action |
|---|---|
| Push | git push |
| Verify | Confirm the latest commit exists on GitHub. |
| Preview | Open the Cloudflare preview deployment. |
| Test | Verify the feature and existing functionality. |
| Fix | Commit 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
The feature branch is merged into
main only after the feature has been reviewed and the preview deployment
has been checked.
Quick Merge Workflow
| Step | Action |
|---|---|
| 1 | Create Pull Request |
| 2 | Compare feature branch with main |
| 3 | Review changes |
| 4 | Check Cloudflare preview |
| 5 | Merge Pull Request |
| 6 | Run git switch main |
| 7 | Run 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
Keeping your local main branch synchronized with GitHub gives
you a clean starting point for the next feature.
Quick Reference
| Command | Purpose |
|---|---|
git switch main | Switch to the main branch. |
git pull | Download and apply the latest changes from GitHub. |
git status | Check the current branch and working tree. |
git log –oneline | View recent commits. |
