0
  • My gitlab repo was ~8GO
  • To rewrite it completely with size optimisation the idea was to reset the remote to the first commit and force push (git checkout <initial hash>; git push -f)
  • Then rewrite the history locally reducing size with compression and LFC, then force push again.

The issue is that after doing git checkout <initial hash>; git push -f the quota used on the repo remotely is still 8GO (and so I am not able to push the history as 8+X > Quota).

What can I do to make gitlab reprocess the quota ? I triggered the warehousing but without any result.

The expected result is: quota 1ko (initial commit)

ATX
  • 1,139
  • 2
  • 11
  • 29
  • 1
    If you're going to remove everything from this repo, it's simplest to delete it and start a brand new one from scratch. Of course, you'd like the issues and other meta data too, so this might not be what you want to do... – joanis May 06 '22 at 17:32
  • 1
    Does the section with the title "Repository cleanup" in the manual help? https://docs.gitlab.com/ee/user/project/repository/reducing_the_repo_size_using_git.html#repository-cleanup – joanis May 06 '22 at 17:38

1 Answers1

1

GitLab holds onto refs in hidden areas that are not advertised. Therefore, even force-pushing to advertised refs will not shrink the repository size. In order to actually reduce repository storage used, you'll need to follow the procedure for purging files from repository history.

sytech
  • 29,298
  • 3
  • 45
  • 86