title: How to cleanup git history removing certain commits after they've been pushed?
body: <p>What I'm trying to do:</p>
  
  <p>I completed a feature.</p>
  
  <pre><code>git add -A; git commit -m "feature A complete"
  </code></pre>
  
  <p>Then I realized I missed some things.</p>
  
  <pre><code>git add -A; git commit -m "feature A missed something 1"
  git add -A; git commit -m "feature A missed something 2"
  git add -A; git commit -m "feature A missed something 3"
  </code></pre>
  
  <p>Now my history looks like this:</p>
  
  <pre><code>A238ad1 feature A missed something 3
  3238adX feature A missed something 2
  1238ad7 feature A missed something 1
  111AAA2 feature A complete
  </code></pre>
  
  <p>I want it to look like this:</p>
  
  <pre><code>111AAA2 feature A complete
  </code></pre>
  
  <p>With all the <code>missed something</code> commits merged into the <code>feature A complete</code> commit.</p>
  
  <p>I know <code>git rebase -i HEAD~4</code> is the right way to go, but it doesn't actually remove the bad commits to clean up the history.</p>
  
  <p>I noticed in some other articles there's a <code>git commit --fixup</code> command and a <code>git rebase -i --autosquash</code>, but I'm not getting it to work properly. I'm sure this is super easy, I'm just out of it today.</p>