Git rebase one branch on top of another branch : <p>In my git repo, I have a <code>Master</code> branch. One of the remote devs created a branch <code>Branch1</code> and had a bunch of commits on it. I branched from <code>Branch1</code>, creating a new branch called <code>Branch2</code> (<code>git checkout -b Branch2 Branch1</code>) such that <code>Branch2</code> head was on the last commit added to <code>Branch1</code>:(Looks like this)</p>

<pre><code>Master---
         \
          Branch1--commit1--commit2
                                   \
                                    Branch2 (my local branch) 
</code></pre>

<p><code>Branch1</code> has had a number of changes. The other dev squashed his commits and then added a few more commits. Meanwhile, ive had a bunch of changes in my branch but havent committed anything yet. Current structure looks like this:</p>

<pre><code>  Master---
             \
             Branch1--squashed commit1,2--commit3--commit4
                                       \
                                        Branch2 (my local branch)
</code></pre>

<p>Now I want have to rebase my changes on top of <code>Branch1</code>. I am supremely confused on how to go about this. I know the 1st step will be to commit my changes using <code>git add .</code> and <code>git commit -m "message"</code>. But do i then push? using <code>git push origin Branch2</code> ? or <code>git push origin Branch2 Branch1</code> ? Help is much needed and GREATLY appreciated, also if I can some how create a backup of my branch, it will be great in case I screw something up</p>
