bare repo git pattern when working with Symfony?
Hi all,
I'm using Laragon for local development and currently learning Symfony. SymfonyCasts has been great so far.
I recently learned about using a bare Git repository with multiple git worktree checkouts, and I'm wondering whether anyone uses this workflow when developing Symfony apps locally.
Normally, if I create a project at:
www/my-project
Laragon automatically gives me a local domain like:
https://my-project.test
But with a bare repo / worktree setup, I imagine the structure would be more like:
www/my-project/
repo.git/
main/
public/
feature-1/
public/
feature-2/
public/
Since Symfony's document root needs to point to each worktree's public/ directory, I'm not sure what the best local setup would be.
Do people usually create a separate Apache virtual host for each worktree, for example:
my-project-main.test -> www/my-project/main/public
my-project-feature-1.test -> www/my-project/feature-1/public
Or is there a better/common way to use Git worktrees with Symfony and Laragon?
I'm mainly trying to avoid constantly switching branches in one working copy, while still being able to test different worktrees easily in the browser.
Thanks!