title: Git rebase non-interactive for last two commits - write a batch file
body: <p>Please help me to write a batch file for <code>git rebase</code> which unites two last commits: <code>HEAD</code> and <code>HEAD~1</code> in current branch into one without using interactive editor.</p>
  
  <p>Assume that both commits have single parent and are not pushed yet.</p>
  
  <pre><code>a683ec1 Not pushed 2
  c7b480a Not pushed 1
  f0e81fb Pushed
  </code></pre>
  
  <p>I want to leave "Pushed" commit and one commit behind it that will contain "Not pushed 1" + "Not pushed 2" in a final state of "Not pushed 2".</p>