We are struggling with our Git Flow process, and deploying features to our Test and Live environment:
- We want all features that is ready for testing, be combined and deployed to the Test environment.
- We want to deploy only specific features to the Live environment
The problem with the way we use Git Flow:
Developer A follows the normal gitflow process to create a feature from "develop", and does his development in a new feature. When ready for testing, he merges his feature into the "develop" branch, and deploy the "develop" branch to the Test environment.
Developer B then follows the same process. Both features are now merged into the 'develop' branch, and both changes visible on the Test environment.
The Client does the testing on the Test environment, but only approves changes made by Developer A to be released to the Live environment. So he will create a new 'release' branch from 'develop'. But this issue is, this will include change from Developer B.
What is the best practice to only release changes from Developer A?
Currently we are following the procedure below, which allows us to release to the Live server per feature(s). But there must be a better way?
We follow the normal Gitflow setup, but we also create a new branch called "qa", this will be created from the master "branch". This is the procedure we follow:
- Pull latest "develop" branch
- Create feature from "develop" using gitflow
- Do all development in a feature
- Once ready for testing,
- pull latest "qa" branch
- while in the "qa" branch
- merge your feature into "qa"
- Release the "qa" branch to the QA server
- If any bug fixes need to be done, repeat from step 3
- If the client for some reason do not need this feature anymore, and it needs to be removed
- Delete the feature
- Undo your merge to qa
- If client happy with testing, select your feature, and follow the git flow process to finish the feature. (This will merge into "develop")
- Select Development branch, and create new release using GitFlow
- Finish the Release using Gitflow (or bundle multiple releases if needed)
- When ready to go live
- make sure you are in the master branch
- if possible, test the project and changes
- copy all files needed to the Live server
But by creating this "QA" branch, we are not using the development branch at all as its intended, making it redundant.
I read through these answers, but doesnt quite help us, or I don't understand here and here