I’ve been researching Git quite a bit, and I get the basic concepts, except how it fits into the workflow of a small team.
As I understand it, I would want:
-
one shared semi-public repo for myself and my team to work from (pulling changes into our local copies) and test features in.
-
one repo where we push anything that’s tested and ready to go live.
-
a live repo where the working directory is the root folder of the actual website
Am I understanding this or complicating it more than it needs to be? Just trying to wrap my mind around it, and very few of the tutorials go into detail on this topic.
My dev team has only one remote repo where all changes are pushed.
Features in development are branched to avoid breaking the master copy, so there may be multiple active branches at the same time. Each developer has a “local” repo that’s actually running on the dev server (we tend to do our development using VIM via SSH). Each of the “local” repos is set up as a unique virtual host that’s tagged with the user’s name. As a result, there may be three or four different versions of the site running on the dev server. This allows developers to test code changes instantly.
When preparing for a release, all finished branches are merged and the resulting code is pulled via git to a pre-deployment server which closely matches the production environment. After approval, the specific commit is tagged with a version number and either pulled using git or rsynched onto the production server where it goes through a few more tests to make sure the deployment went smoothly.