threads / discuss / 59494

Removing old objects from partial clone

Subject: Removing old objects from partial clone

## tl;dr

2 messages between Mar 28, 2023 and Mar 29, 2023.

replies: 1people: 2as markdown or json

uzytkownik2@gmail.com· Mar 28, 2023, 23:28 UTC · lore
Hi,
I'd like to periodically remove objects which:
 - Are not reachable from newest N commits from any branch
 - Can be fetched from server if needed

Unfortunatly I work on large repo and git gc doesn't work as all objects are still technically reachable.

Christian Couder· Mar 29, 2023, 08:51 UTC · re: uzytkownik2@gmail.com · lore

Re: Removing old objects from partial clone

Hi,
On Wed, Mar 29, 2023 at 2:13 AM <uzytkownik2@gmail.com> wrote:
Show 10 quoted lines
>
> Hi,
>
> I'd like to periodically remove objects which:
>
>  - Are not reachable from newest N commits from any branch
>  - Can be fetched from server if needed
>
> Unfortunatly I work on large repo and git gc doesn't work as all
> objects are still technically reachable.

John Cai and I have been working on a new `--filter` option for `git repack` that might help you but is dangerous to use (as it could remove objects that haven't be pushed which could corrupt the repo).

We haven't been able to get it accepted but you may still find the discussions and code interesting.

See https://lore.kernel.org/git/20221221040446.2860985-1-christian.couder@gmail.com/

← back to recent threads