Failing to push to Github (this exceeds GitHub's file size limit)

I think that you have a commit with this file. Even if you delete the file and make a new commit, the file is persisted in a previous commit. And git push send all the missing commits to the remote.

You have to rewrite git history before pushing it. Without a git log, I can't help you with an exact command. Squashing Commits can do the job.


I fixed this issue by the following:

  1. git stash
  2. git rebase -i
  3. Then a text editor popped up and allowed me to write the term, "drop" next to the commit I needed to delete. The commit was deleted successfully.
  4. git push

Try:

git filter-branch --tree-filter 'rm -rf path/to/your/file' HEAD
git push