I have a project that is located in Git Stash Repository. The code will be deployed in four environments(Dev, Test, Stage and Prod). We follow Agile methodology. So dev team works for both Release activities and Non Release( Future Release) activities. I have to create branches based on this requirement. Below is my plan.
Three stable branches: master, release and develop.
master is the default branch. develop will be created from master. release will be created from develop
feature branches --> they will be created from develop. each developer has one feature branch and they merge the code into develop branch once done. so dev environment deployment will happen from develop branch.
if changes need to go Test environment, we have two ways here. one is merge the develop branch with release branch( Test environment deployment will happen from release branch). We can not implement this since develop branch may have both release and non release changes.
another one way is merge the feature branches directly into release branch. so that each developers changes can be merged into release branch. I am not sure whether i can implement this method. Can someone please tell me if this way will work? is there any alternate way to handle this situation.
branching:
master branch---> develop branch --> release branch
develop branches --- feature branch1 | feature branch2 | feature branch3
deployments:
develop branch for --> dev deployments
release branch for --> test deployments
master branch for --> stage and prod deployments
I can not merge develop branch into release branch. Since develop branch has some non- release changes as well. I need only release changes on release branch. can feature branches be merged into release branch directly? What is the best approach here?