title: Git branching on test environment
body: <p>I started working on a company that newly using git. I need a good recommendation. First, I would like to talk about current workflow.</p>
  
  <p>The team's workflow is pretty much different than regular git basis. 
  The branches are</p>
  
  <pre><code>Local (feature/hotfix branch from Dev) -&gt; Dev -&gt; Test -&gt; Prod
  </code></pre>
  
  <p>The environments</p>
  
  <pre><code>Dev -&gt; Test -&gt; Prod
  </code></pre>
  
  <ol>
  <li>Each branch have different config files (No solution for that yet. But I will fix this issue first) therefore, we can't merge the branches.</li>
  <li>Developers are working on Local (feature/hotfix branch) and merge their pushes into the Dev branch and publish their versions on Dev environment (just patch version is increasing (1.0.xxx), I know it is not good thing to do.) </li>
  <li>And then they cherry-pick their changes into the Test branch. And, they publish a new version on the test environment. UAT is happining here.</li>
  <li>When the developers want to publish their changes into production environment they also cherry-pick their changes. And publish a new version on prod environment.</li>
  </ol>
  
  <p>First problem here, we can't observe the branches' history very well because we can't merge the branches due the config files.</p>
  
  <p>Second problem is some of the changes should stay on test environment 1-2 two weeks, changes can have a long or short lifetime. </p>
  
  <p>Third problem, we can't use git features like merge and pull request. We want to use PR for code review and so on. It is important for us.</p>
  
  <p>I can say the deployment process and version control system are mixed in this scenario. Therefore, we would like to use something like git-flow. Although, <strong>we want to keep that three environments (dev, test and prod) and main goal is merging the branches and using the pull requests</strong></p>
  
  <p>Let's say, we have only develop and master branches. Developers work on feature branches. And merge their features into develop.Next, we created a release branch for test environment. But what we should do for different lifetime change-sets ?</p>
  
  <p>How we should merge the release branches into master branch ? How we should handle the test environment on git branches ?</p>
  
  <p>For example;</p>
  
  <p><code>release 1.3.0</code> - have a feature that should stay 2 weeks on test environment and then should go for production environment</p>
  
  <p><code>release 1.4.0</code> - someone added a new feature that should go for production environment in a couple of days. (while <code>release 1.3.0</code> is still alive.)</p>
  
  <p>So, test environment will have that two features and prod should have the latest one after a couple of days. But the <code>release 1.4.0</code> branch have the both features. What should I merge into production branch ?</p>
  
  <p>Should we use different thing than git-flow ? what is your recommendation ?</p>