Self-serve repository size reduction after size limit reached
Problem to solve
For an active repo, it is very difficult to reduce the size of the repository. Tools like git filter-repo
make this possible, but features like refs/keep-around
mean a user can't use these tools without direct access to the Git server because these refs can't be fetched.
The work around would be to export the project, remove all the refs, then re-import.
Further details
It is possible to get at quite a lot of data by adding +refs/merge-requests/*:refs/remotes/origin/merge-requests/*
to the local Git config, and then use a tool like git filter-repo
, but some data is likely to be reachable only from refs/keep-around
which is not possible to touch.
Proposal
Add documentation to:
- export
- modify
project.bundle
- import using the
overwrite=true
option in the API
Edited by James Ramsay (ex-GitLab)