title: How to do a branch per task strategy with git
body: <p>Currently, my team is looking for an agile git branching strategy. I originally thought we could follow this article: <a href="http://nvie.com/posts/a-successful-git-branching-model/" rel="nofollow noreferrer">http://nvie.com/posts/a-successful-git-branching-model/</a>, but unfortunately we do pushes to production too often to work on a branch with multiple tasks in it until it is stable (the next release branch strategy). Also, there is often situations where issues that should only take a few days to finish take a while to resolve due to priories changing. Because we do not have the time to work on these long running tasks they sit in dev or a next release branch and give way to the possibility of breaking production.</p>
  <p>I want to adopt a branch per task strategy and want to know how it has been done with git before. I'm not just talking about feature branches, but a branch for every individual task you are assigned. Also, there would be no dev branch since your task branches will be your dev branch. Having a develop branch entices developers to commit directly to that branch which leads to open issues in our main branch.</p>
  <p>I came up with this:</p>
  <p><a href="https://i.stack.imgur.com/n2Y3D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n2Y3D.png" alt="enter image description here" /></a></p>
  <p>I believe adopting this strategy will keep the main branch clean and will also account for when developers are not around to finish their tasks before we do a push to production.</p>
  <p>The main idea behind it is that the main branch is a protected branch and there is no development branch. Since the main branch is protected it will force you to create a branch off of it for individual tasks. In order to merge back in you have to request a merge from the administrator. We will tag every release to production and hotfixes will also be branches off of the main branch. We have four test sites set up that we can use to test the different task branches.</p>
  <p>I haven't seen any examples of this strategy just yet, so I was hoping to get some feedback on what I have here.</p>
  <p><strong>UPDATE</strong></p>
  <p>So I know its been a while since this question was posted, but if anyone is looking for a similar strategy it seems that GitHub has adopted it <a href="https://guides.github.com/introduction/flow/" rel="nofollow noreferrer">here</a>.</p>