February 13th, 2019
This is easily done, you've zipped up your site to upload to a server and pushed to GitHub, you then get an error message like this:
remote: error: File Archive.zip is 214.15 MB; this exceeds GitHub's file size limit of 100.00 MB
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ...
This helpful page from github has a solution. The steps are also below:
Change the current working directory to your local repository.
To remove the file, enter
git rm --cached:
git rm --cached giant_file # Stage our giant file for removal, but leave it on disk
Commit this change using
git commit --amend -CHEAD # Amend the previous commit with your change # Simply making a new commit won't work, as you need # to remove the file from the unpushed history as well
Push your commits to GitHub:
git push # Push our rewritten, smaller commit