title: Git branching strategy for Agile project
body: <p>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.</p>
  
  <p>Three stable branches: master, release and develop.</p>
  
  <p>master is the default branch. develop will be created from master. release will be created from develop</p>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>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.</p>
  
  <p>branching:</p>
  
  <p>master branch---> develop branch --> release branch</p>
  
  <p>develop branches --- feature branch1 | feature branch2 | feature branch3</p>
  
  <hr>
  
  <p>deployments:</p>
  
  <p>develop branch for --> dev deployments</p>
  
  <p>release branch for --> test deployments</p>
  
  <p>master branch for --> stage and prod deployments</p>
  
  <p>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? </p>