Currently, everything that is in the public_html folder automatically gets published live. The git repository is also inited in this folder (though this can change if it's necessary).
What is a good git workflow/set up such that my changes are only published when I do a
git push, instead of automatically whenever I do a write to disk?
Ideally, I would have one or more branches as a development branch, and one for a stable branch (per standard git work flow). But if I create 2 branches in the public_html directory, my server will publish whatever branch I am on.
Should I create a mirror directory, and connect it to the same git repo, and limit one to pull access, while the other one has push and pull access?
Any suggestions would be great.