title: Git merging hotfix to multiple branches
body: <p>I've been trying to wrap my head around git branching models.  I've been looking at <a href="http://nvie.com/posts/a-successful-git-branching-model/" rel="noreferrer">http://nvie.com/posts/a-successful-git-branching-model/</a> for some ideas and coming from Subversion one thing I was really looking forward to was making a change in a single place and merging it to all the branches that needed it.  In Subversion, we ended up doing to much copy of code around.</p>
  
  <p>However I still don't get this completely.  Here is a standard type of workflow that I have and it will always come up with conflicts.</p>
  
  <pre><code># create new version branch
  git checkout master
  git checkout -b v3
  vim pom.xml  # change branch version to "3.1-SNAPSHOT"
  git commit -a
  git checkout master
  vim pom.xml  # change master version to "4.0-SNAPSHOT"
  git commit -a
  </code></pre>
  
  <p>So the master is at 4.0-SNAPSHOT and the branch is at 3.1-SNAPSHOT.</p>
  
  <p>Not I want to create a hotfix on the branch and move it to the trunk.</p>
  
  <pre><code>git checkout v3
  git checkout -b hotfix
  vim file.txt  # make a bugfix change
  git commit -a
  git checkout v3
  git merge hotfix  # this works fine
  git checkout master
  git merge hotfix  # this has a conflict since both branches have changed the version
  </code></pre>
  
  <p>I understand why its happening and it makes sense.  Is there a better way of doing this?</p>
  
  <p>I read about cherry-pick, which I tested and does work:</p>
  
  <pre><code>git checkout v3
  git cherry-pick a518b0b75eaf28868
  git checkout master
  git cherry-pick a518b0b75eaf28868
  </code></pre>
  
  <p>However, that doesn't seem like the "correct" way to handle this.  Any suggestions?</p>