title: How to write the commits of a remote branch to my local branch?
body: <p>I have a remote branch, let's called it <code>FIN-985_the_original</code>. I have my local branch, which is called <code>FIN-985_v2</code>. <code>FIN-985_v2</code> is a branch from master.</p>
  
  <p>I did two commands and I'm confused as one clearly gave me what I want</p>
  
  <p>First one is the one below</p>
  
  <pre><code>git rebase --onto FIN-985_the_original FIN-985_v2
  </code></pre>
  
  <p>This one put the content of <code>FIN-985_the_original</code> into <code>FIN-985_v2</code>, issue is it seems to replace the contents of <code>FIN-985_the original</code> into <code>FIN-985_v2</code>, wiping out the commits done into <code>FIN-985_v2</code>.</p>
  
  <p>The second part seems to give me what I want but it kind of defy my logic</p>
  
  <pre><code>git checkout FIN-985_the_original
  git rebase FIN-985_v2
  </code></pre>
  
  <p>I was expecting that the the rebase would be done on FIN-985_v2 and instead, it was done on <code>FIN-985_the_original</code>. From my command, I know it makes sense as the checkout was done on <code>FIN-985_the_original</code> but it bugs my logic as I've read <a href="https://akrabat.com/the-beginners-guide-to-rebasing-your-pr/" rel="nofollow noreferrer">this</a> </p>
  
  <p>Any tips are more than welcomed to deconfuse me.</p>
  
  <p>Cheers</p>