PHP Alive And Kicking: Episode 22 Sara Golemon
Topics Covered
Rather than switching between branches and losing build state, Git Worktrees let you check out multiple branches into separate directories — all sharing a single .git history.
- How Worktrees differ from standard
git checkoutbranch switching - Why they shine for projects with build artifacts (compiled code, minified JS) — no recompile on directory switch
- Working with PHP’s multi-version release branches (8.1 → 8.2 → 8.3 → 8.4 → 8.5 → master) simultaneously
- Merging a fix up through all active PHP release branches in a live demo
- Pushing all branches at once from a single shared
.gitdirectory - Cleaning up with
git worktree prune— just deleting the folder isn’t enough!
git worktree add <path> <branch> git worktree list git worktree prune git branch -d <branch> # Only works after pruning
The hosts explored how Worktrees fit into a typical PHP web dev workflow with Docker.
- Run multiple Docker Compose environments simultaneously — one per Worktree/branch
- Port clashing is real; solutions include scripted aliases and Lando (handles conflicts automatically)
- Sara’s Git alias
newfrom Facebook/Meta automated Worktree creation and assigned unique IPs per ticket composer installonly needs to run once per Worktree — not on every branch switch
PHP Architect Social Media:
X: https://x.com/phparch
Mastodon: https://phparch.social/@phparch
Bluesky: https://bsky.app/profile/phparch.com
PHPArch.me: https://phparch.me/@phparch
Discord: https://discord.phparch.com
Subscribe to our magazine: https://www.phparch.com/subscribe/
Partner
This podcast is made a little better thanks to our partners
Infrastructure Management, Simplified
Automate Kubernetes deployments across any cloud provider or bare metal with a single command. Deploy, manage, and scale your infrastructure with ease.
https://displace.tech/
Put Your Technical Debt on Autopay with PHPScore
Cut code review time & bugs in half instantly with CodeRabbit.
Music Provided by Epidemic Sound
Listen
Podcast (episodes): Play in new window | Download | Subscribe
| Air date | April 17, 2026 |
|---|---|
| Hosted by | Mike Page, Chris Miller |
| Guest(s) | Sara Golemon |




