In my (small) company, we are currently thinking about dumping our current versioning system (svn) and release procedures, which are crap TBH, and switching to git. It will mainly be used for one large web project which we will be continously developing for some years, at least. Considering what I found on the web and some questions here on Programmers.SE, I came up with the following workflow (based on the gitflow workflow):
We have three web servers called live, webtest and webdev, and three main branches, master, testing (branched from master) and development (branched from testing). The code in master will always be exactly the one deployed in the live (production) system, and the code in testing will always be exactly the one deployed on the webtest server. The webdev server, however, will be continously used by the developers to upload their code, so it does not necessarily correspond to the development branch.
Whenever a developer starts working on a new feature, he creates a feature branch from development, works on it (and frequently uploads his current progress to webdev), commits to development from time to time, and whenever he thinks he's done, he merges back his feature branch back into development (1).
Whenever a bunch of features is ready (and possibly reviewed by other developers), we merge development into testing (and this code is deployed on webtest), so it can be tested (2). When the testing in done and everything seems fine, we merge testing back into master (3), and the code in master is deployed on the live production server.
I have some questions about this: In (1), (2) and (3), would it make sense to create pull requests rather than just merging? How would we approach errors found in testing - by creating branches off testing or by fixing it in the respective feature branch and then merging back into development and testing? Are there any other major drawbacks or caveats I have overlooked? Do you have any other enhancements or suggestions?
