title: How to remove "too large" file from git history?
body: <p>I added a 212MB file to my folder and committed it and tried to push it. Git told me that the file size was too big so I can't push it. I deleted the file, but it is still shown when I try to push my code.</p>
  <p>My actual steps were:</p>
  <ol>
  <li><p>I did <code>git add .</code></p>
  </li>
  <li><p>Then <code>git commit -m &quot;New css&quot;</code></p>
  </li>
  <li><p>Then <code>git push origin development</code></p>
  </li>
  <li><p>Then it took a long time to run the above command. It ended with saying &quot;path/to/file/file.mp4 is 212MB which is too big. Failed to push&quot;.</p>
  </li>
  <li><p>Then I deleted that file manually.</p>
  </li>
  <li><p>Tried pushing again, same problem.</p>
  </li>
  </ol>
  <p>I was told by other stackoverflow answers to use <code>git filter-branch --tree-filter 'rm -rf path/to/your/file' HEAD</code></p>
  <p>I'm just trying to understand what this means. Will this affect my whole repo or just the above mentioned file? What happens if I manually deleted the file already? So the file path doesn't exist.</p>
  <p>For example, since I tried pushing to the development branch, I did <code>git push origin development</code>. This failed, so assuming the file I'm trying to delete is named Testing.mp4, should this be the code:</p>
  <p><code>git filter-branch --tree-filter 'rm -rf public/uploads/videos/testing.mp4' HEAD</code></p>
  <p>Am I right? Again, this will ONLY delete the video and nothing else?</p>