This is how I do it.
Each developer has their own git repository to develop their code. You, as a merger, keep a third repository, and this repository has separate branches for each developer, for your test system and your production site.
Your developers can push your changes to you, or you can pull their changes from them into branches specifically for them. You have a branch that you control that contains the combined code in a state for testing. You either use git -cherry-pick, or maybe just git-merge, to push your changes to your test branch, you have tested things (and possibly made your own changes), or sent development error messages, and you - enable their changes). When you are happy, you will be transferred to the “production” branch. This usually comes from the test branch, but with the changes necessary for a living system (I always find something, even if it's just a database name and password).
I usually use git hook with some code that checks which branch I am joining in and then uses rsync via ssh to direct the code to my production site.
#!/bin/bash branch=$(git branch | sed -ns/^\*\ //p) version=$(git describe --tags) cd "$git rev-parse --show cdup)" if [ "$branch" == "production" ]; then echo "?php echo '$version';?>" > web/version.inc rsync -axq --delete web/ site:public_html/ fi
akc42
source share