Wondering how everyone else handles git within their local site installation?
Currently we’re committing the entire WordPress directory into git (potentially moving to using Composer to manage core/plugins later), however in the past we’ve had issues with the folder structure naming, which is probably a Docker based issue.
A sample site would have two folders under /app/ - public and sql. So if we used the standard path without modifying it, every site would live in /app/public. I’m not sure whether its a missing feature, or a feature that other systems have, but a combo of Bitbucket and Gitkraken don’t allow overriding the name of the repo, and will default to the name of the folder it exists in. Hence this being a problem - every site ends up being “public”.
The workaround I came up with was using the volumes manager to remap public to the sites name, eg I’d map C:\path-to-local\example-site\app\example-site to /app/public, ensuring all repos had folder names directly relevant to what they were.
Currently I’m on Local 3.3.0 to keep this workaround, as another dev I work with had some trouble getting the symlinks working on Lightning, so now he’s got a bunch of repos named public.
Assuming I can get the workaround working on Lightning, it’d be something I could live with, though I’d be keen to see if anyone knows any better ways to manage this? Committing at the root level of the site at a minimum is a must - we’ve got additional changes at the wp-config level as well as bunch of custom htaccess rules. Another alternative is committing at the site’s base level, which would also grab the config and logs (could gitignore it, though config might be useful), though in git it’d be a lot of extra levels before you get to the actual site.
Curious what other people’s workflows in regards to how you commit into git are - surely I’m not the only one committing the entire site who’s run into this issue before!