title: How to move some last Git commits currently on a branch, onto another branch?
body: <p>I have a repository where I had been working on <code>master</code> branch having last added some 10 or so commits which I now wish were on another branch, as they describe work that I now consider experimental (I am still learning good Git practices).</p>
  
  <p>In light of this consideration, I would now like to have these last 10 commits form their own branch so to speak, so that I can have <code>master</code> clean and reserved for "release" / "stable" commits only.</p>
  
  <p>To illustrate, what I have is:</p>
  
  <pre><code>        b--b (feature B)
         /       
  X--X--X--Z--Z--Z--Z--Z--Z (master)
      \
       a--a--a (feature A)
  </code></pre>
  
  <p>You can see that commits marked with <code>X</code> and <code>Z</code> are all on the <code>master</code> branch, while what I want is commits marked with <code>Z</code> (the now considered experimental "feature Z" work) to lie on their own branch and <code>master</code> ending with the rightmost <code>X</code>. To illustrate, the desired graph:</p>
  
  <pre><code>        b--b (feature B)
         /       
  X--X--X (master)
      \  \
       \  Z--Z--Z--Z--Z--Z (feature Z - the new branch I want)
        \
         a--a--a (feature A)
  </code></pre>
  
  <p>That way I will have my <code>master</code> reserved for releases and otherwise stable commits, being able to merge in A, B and Z features as needed.</p>
  
  <p>So how do I move the "Z" commits onto their own branch?</p>