Local Development Workflow
This repository uses two local Git worktrees:
C:\Users\dms\OneDrive\Documents\GPS Webpage— live checkout onmaster.C:\Users\dms\OneDrive\Documents\GPS Webpage-dev— development checkout ondev.
The live site is deployed to https://gps.co.za when master is pushed. Changes made on dev stay local until they are reviewed and merged into master.
Preview changes locally
Open PowerShell and run:
Set-Location "C:\Users\dms\OneDrive\Documents\GPS Webpage-dev"
bundle exec jekyll serve --livereload --destination "..\gps-webpage-dev-build"
Then open http://localhost:4000. Jekyll will rebuild the preview when source files change. Stop the server with Ctrl+C.
The build destination is outside the repository because this project tracks the live _site output. Do not use the default destination when previewing the dev checkout.
Save development changes
Review the changed files before committing:
Set-Location "C:\Users\dms\OneDrive\Documents\GPS Webpage-dev"
rtk git status --short --branch
rtk git diff
Commit only the approved files:
rtk git add <approved-files>
rtk git commit -m "<descriptive message>"
Publish approved changes
First confirm the dev checkout is clean and on dev, then confirm the live checkout is clean and on master:
rtk git -C "C:\Users\dms\OneDrive\Documents\GPS Webpage-dev" status --short --branch
rtk git -C "C:\Users\dms\OneDrive\Documents\GPS Webpage" status --short --branch
Fast-forward the live branch to the reviewed dev commits and push it:
Set-Location "C:\Users\dms\OneDrive\Documents\GPS Webpage"
rtk git pull --ff-only origin master
rtk git merge --ff-only dev
rtk git push origin master
The existing GitHub Actions Pages workflow then deploys master to https://gps.co.za. Check the workflow result and the live site after the push.
Keep dev current
After a live update has been published, make sure the dev checkout is clean before starting new work. From the dev checkout, update it from the local live branch:
Set-Location "C:\Users\dms\OneDrive\Documents\GPS Webpage-dev"
rtk git rebase master
If the rebase reports conflicts, stop and resolve them before making new site changes.