title: Git: How to rebase and squash commits from branch to master?
body: <p>I'm trying to rebase and squash all my commits from current branch to master. Here is what I'm trying to do:</p>
  
  <pre><code>git checkout -b new-feature
  </code></pre>
  
  <p>make a couple of commits, after it I was trying:</p>
  
  <pre><code>git rebase -i master
  </code></pre>
  
  <p>in this case commits will remain in <code>new-feature</code> branch</p>
  
  <pre><code>git checkout master
  git rebase -i new-feature
  </code></pre>
  
  <p>It gives me and edit window with noop message.</p>
  
  <p>I know about command:</p>
  
  <pre><code>git merge --squash new-feature
  </code></pre>
  
  <p>But I'm currently working on learning of <code>rebase</code> command.</p>