title: Delete a git commit pushed on a remote branch
body: <p>We use git and GitFlow as versioning tools, and I'm facing a problem that I am quite sure some people have already encountered.</p>
  
  <p>In a feature branch, a colleague did a commit in which a lot of useless files were inserted (all binary and IDE metadata files). This commit was pushed. Now this colleague submits a pull request, and I don't want to integrate all these useless files into <code>develop</code>.</p>
  
  <p><strong>Now, my git repository is quite huge, and a git clone becomes a long and boring process...</strong></p>
  
  <p>The first (and easy) solution is to remove these files from the feature branch, and commit without these files (or do a <code>revert commit</code>). But if I do that, my git repository will remain quite big because objects (files) will not be removed from the history (because git still knows about them!).</p>
  
  <p>What I would like is to "cancel" this commit.</p>
  
  <p>The following picture shows my problem (the topmost commit is the oldest):</p>
  
  <p><a href="https://i.stack.imgur.com/533AF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/533AF.png" alt="Graph of git repository"></a></p>
  
  <p><strong>How can I remove this commit and make my git clone quick again ?</strong></p>
  
  <p><em>PS: Thanks to GitGraphJS for their useful tools to draw git graphs!</em></p>