Trying to reduce repo size, overwriting branches failed

I am trying to reduce my repository size following the tutorials at Reduce repository size | GitLab. But :

  • I wasn’t able to push the changes to overwrite the branches.
    The command git push origin --force 'refs/heads/*' failed with error message remote: fatal: pack exceeds maximum allowed size

  • Error message screenshots:

  • I am on version GitLab Enterprise Edition 13.12.0-pre, using gitlab.com

  • Trouble-shooting steps I’ve taken:

    • I disabled the protected branch following the tutorial mentioned above
    • I searched on StackOverflow but I think their solution is to break one single push into multiple commits and push. I am not sure how to do that since I didn’t have any commit? I also tried to push files inside refs/heads one by one, but a ls and du-hs showed that the repo is empty
  • Other info:

    • I am on WSL2, Ubuntu 20.04. I installed git-filter-repo by extracting the tar file, copying the script and setting the alias in .bashrc: alias git-filter-repo='/usr/lib/git-core/git-filter-repo'
    • The repo is currently 9.7GB in size. It was forked from another repo but I removed the fork relationship
    • The tutorial Reduce repository size | GitLab asked to export the project. But my download link always show “expired” even if I clicked them right after the email. So instead of downloading the exported tarball, I did: git clone --bare --mirror git@gitlab.com:<repo_path>.git <local_path>
    • I wanted to remove one folder as a test, so I did git filter-repo --path <folder_path> --invert-paths