Hi, On 2013-05-24 09:33, Bruno Cassol wrote: > Hi, > we have the following setup and I would like advice/help. I'm not even sure > if this the correct setup. > > DEVELOPERS WORKSTATIONS (Windows/TortoiseGit) > c:\xamp\htdocs\intranet/ > | > | push / pull > V > DEV (CentOS/ssh) > /home/git/repos/intranet/ (bare) > /var/www/html/intranet/ (working/apache) > | > | push > V > TESTING (CentOS/ssh) <--- Boss tests the system here > /home/git/repos/intranet/ (bare) > /var/www/html/intranet/ (working) > | > | push > V > PRODUCTION (CentOS/ssh) > /home/git/repos/intranet/ (bare) > /var/www/html/intranet/ (working)
Let me give you my opinion here. I think it's a good opinion but I'll let you judge for yourself. You should have a separate fork of the repo when there is a person specifically in charge of that fork. By that I mean the person will pull new commits into the fork, and keep it maintained and published so that the next person can pull from it as and when necessary. Using this strategy it makes sense to have one public fork per developer, maybe a little less sense to have a DEV fork (who's in charge of maintaining it?), a lot of sense to have the TESTING fork (the boss is using that for testing), and finally it's probably a good idea to have a PRODUCTION fork (what we call the `blessed' repo) maintained by a release engineer or someone like that. The extreme opposite approach is to have a single repo with separate branches for each purpose (developer, testing, production) which everyone commits to. Git obviously supports this but you still have to deal with the risk of somebody pushing some commits where they shouldn't and then making a mess in the central repo. With the forks approach you don't need to worry about the production repo because the release engineer takes good care of it. > How can I only push some commits and not others from DEV to TESTING? Put the commits you want to push on a separate branch and push only that branch. Or if you do decide to have one person maintaining each fork, have the TESTING maintainer pull from the DEV maintainer. HTH, Yawar
signature.asc
Description: OpenPGP digital signature