Cannot Reduce Repo Size

When I’m trying to push something, following message comes up:
“Your push has been rejected, because this repository has exceeded its size limit of 9.8 GB by 1.5 GB”

Then I was trying to do the steps for cleaning history described in

But I try to " git push origin --force ‘refs/heads/*’ ", it says “fatal: --mirror can’t be combined with refspecs”.

I would be pleased about solution suggestions!!!

Hi @marcwittlinger, welcome to the Community Forum! Thanks for posting your question.

In the docs you shared, please make sure you jump right to this section and follow these steps for cleaning up your repositories.

The only foolproof way to actually decrease the repository size is to prune all the unneeded stuff locally, and then create a new project on GitLab and start using that instead.

I also wonder if these GitLab repo housekeeping docs might help?

I’m not an expert, but hope these point you in the right direction!


Hi @marcwittlinger! Great question.

While @slee24 is linking the correct documentation, I was able to duplicate this problem myself, and I believe I found a workaround.

Please try again using git push origin --force --mirror --prune instead of git push origin --force ‘refs/heads/*’ and let us know if this resolves the problem.

If you’re still blocked from pushing to the repository due to exceeding 10Gb size limit, please open a support ticket with a link to the repository requesting a temporary increase of the size limit to allow the force push to succeed.

Let us know how it goes, or if you have any questions or concerns!


Thanks @slee24 & @gitlab-greg!
I could solve the issue by prune the history locally and pushed it into a new project as @slee24 mentioned.


Awesome! Thanks @gitlab-greg! :handshake:

1 Like