I was wondering after having some issues with Git what the best way to handle the repo for a website. Currently we have 3 versions of a website; production, beta and development. We’ve set the Git repo up much the same with 3 branches, master (production), beta (beta), develop (development).
Once we get done with a set of changes/features, we update the development branch then we copy that branch to branch beta. All the while development still continues on the develop branch with more new features etc.
The problem we’re having is that inevitably while the code is in beta, bugs are found. Those bugs need to be fixed in both develop and beta branches. Meanwhile more development has been done on the develop branch that doesn’t and shouldn’t belong in the beta branch so we can’t really merge beta and development branches can we? I also don’t really want to go through the time and trouble of having to make individual commits to both repos with the change that applies to both.
So what I’m looking for is the best way to manage this type of work flow with Git.
Thanks
Check out git-flow (aka: A successful Git branching model). Production runs from the master branch, develop from develop and beta from the current release branch (if there is one).
Edit:
This answer points to the same approach as the answer by Justin