title: Remove large file from git commit
body: <p>I added a 150MB video to my projects source files and, unawarely, committed it. I then tried to <code>git push</code> the commit to my remote repo and noticed the the push <strong>hung</strong> for a while and then eventually failed, spitting out this: </p>
  
  <pre><code>Counting objects: 17, done.
  Delta compression using up to 8 threads.
  Compressing objects: 100% (16/16), done.
  Writing objects: 100% (17/17), 145.48 MiB | 138.00 KiB/s, done.
  Total 17 (delta 13), reused 0 (delta 0)
  remote: Resolving deltas: 100% (13/13), completed with 12 local objects.
  remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
  remote: error: Trace: 8b4191f1a1055e7dea4412f80b5125d2
  remote: error: See http://git.io/iEPt8g for more information.
  remote: error: File src/images/greystone_place.mp4 is 145.45 MB; this exceeds GitHub's file size limit of 100.00 MB
  </code></pre>
  
  <p>I tried adding the file to <code>.gitignore</code> but it was too late. Subsequent <code>git push</code> commands yielded the same result.</p>
  
  <p>Next, I tried to reset HEAD --soft to the commit where I originally committed the large file (this was after a few more commits involving <code>.gitignore</code>). From there, I reset the file in question using <code>git reset HEAD -- path/to/filename</code> to the working directory and committed again. Doing this, I still ran into the same error.</p>
  
  <p>I later realized that maybe using the <code>--amend</code> command would do the trick (based on <a href="https://help.github.com/en/articles/removing-files-from-a-repositorys-history" rel="nofollow noreferrer">this article</a>), but this also didn't work. </p>
  
  <p>I also tried using <code>git rm --cached path/to/file</code> while I was in a soft reset. This also failed.</p>
  
  <p>I have begun reading about <code>git rebase i</code> and <code>git filter-branch</code> but they seem complicated and I'm not sure if I'm barking up the wrong tree with this approach.</p>
  
  <p>I am not a Git expert but in a nutshell, I want to do a <code>git push</code> with my other changes and exclude this large file. Somehow, it seems to be intertwined in an earlier commit and is preventing me from making a <code>push</code> to my remote repo.</p>