-
Push and see what files are rejected:
$ git push
-
Then it will show the path of the large file in a specific commit, delete the file throughout git history using this path:
$ git filter-branch --force --index-filter \ "git rm --cached --ignore-unmatch PATH-TO-LARGE-FILE" \ --prune-empty --tag-name-filter cat -- --all
However, note that if the file existed in another location at some point, that was not deleted, so push again to see the path if you fail to recall.
-
Repeat 1 and 2 until it was deleted completely, then
$ git push --force
- recursively
-r
removerm
files from index--cached
git rm -r --cached .
- add
add
everything again
git add .