title: How to remove a dangling commit from GitHub?
body: <p>Yesterday, I pushed to <a href="https://github.com/nylen/connectbot" rel="noreferrer">my fork of ConnectBot on GitHub</a>. I pushed once, realized that I hadn't made the change the way I wanted, redid the commit and pushed again.</p>
  
  <p>Now, GitHub has both commits:</p>
  
  <ul>
  <li><a href="https://github.com/nylen/connectbot/commit/1cd775d" rel="noreferrer">https://github.com/nylen/connectbot/commit/1cd775d</a> – the first, “bad” commit</li>
  <li><a href="https://github.com/nylen/connectbot/commit/987671c" rel="noreferrer">https://github.com/nylen/connectbot/commit/987671c</a> – the one I want to keep</li>
  </ul>
  
  <p>My master branch is only tracking the second commit, but the first commit is still available and is still in my activity feed.  How can I remove it to make sure no one accidentally pulls that commit instead of the corrected version?</p>