0

Last Saturday (21 April) I made some minor improvements in my local repository. After pushing the minor changes, the "writing objects" got stuck, resulting in a "fatal: the remote hung up unexpectedly". Afterwards, I realized that I recently and accidentally stored a zip file of 2.7GB in the map that I tried to push to the remote (with all the other files in the map, the size exceeded 3GB). I thought that manually deleting this zip file in my local repository and then pushing the changes could fix the issue, but I was met with the same error. Without this zip file in my local repository, the size is not that large, and pushing the repo to the remote is normally done within a few seconds. So I suspect that despite the manual deletion of this zip file, that it is still apparent somewhere in the git history.

Unfortunately, I did x number of commits between the moment I tried to (accidentally) push this zip file and the moment I realized that this zip file may have caused issues. Looking into my log, I already did several commands between the moment I tried pushing the zip file to the remote last Saturday and tonight, including several commits, attempted pulls and pushes, and a git filter-repo.

Now, whenever I try to (force) push local changes to the remote, the writing objects part lasts very long and is followed by this fatal error:

enter image description here

How can I solve this issue so that my local repository successfully pushes to the remote again?

1 Answers1

0

You need to remove the zip file from every commit - even past ones. It is not enough to remove it from the latest commit, because it will persist in history.

You mentioned git-filter-repo but didn't say what you'd done. BFG works pretty well for this sort of thing, too; one of its main stated functions is removing "crazy big files".

Jim Redmond
  • 4,139
  • 1
  • 14
  • 18