Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up / reduce size of git repo #105

Open
bitsgalore opened this issue Aug 22, 2017 · 3 comments
Open

Clean up / reduce size of git repo #105

bitsgalore opened this issue Aug 22, 2017 · 3 comments
Assignees
Labels
bug A product defect that needs fixing P2 Medium priority issues to be scheduled in a future release

Comments

@bitsgalore
Copy link
Member

bitsgalore commented Aug 22, 2017

Dev Effort

1D

Description

Currently > 200 MB, this is getting ridiculous.

Some clues:

https://confluence.atlassian.com/bitbucket/reduce-repository-size-321848262.html

@ghost ghost assigned carlwilson Feb 21, 2019
@ghost ghost added this to the v1.20-m4 Release milestone Feb 21, 2019
@ghost ghost added bug A product defect that needs fixing P2 Medium priority issues to be scheduled in a future release labels Feb 21, 2019
@carlwilson
Copy link
Member

carlwilson commented Oct 8, 2019

I've done some experimentation here with some success. I started here: https://stackoverflow.com/questions/2116778/reduce-git-repository-size which took me here: https://stackoverflow.com/questions/685319/git-pull-error-unable-to-create-temporary-sha1-filename/685422#685422. I've managed to reduce the repository size to 92 MB by:

$ git-prune
$ git-gc --aggressive
$ git-repack
$ git-repack -a

I'm not yet convinced enough that there's no repercussions to force a push over the GitHub repo. This might best work as a maintenance task straight after the release when we can prune the branches back a little also.

@carlwilson carlwilson removed this from the v1.20-m4 Release milestone Apr 27, 2020
@carlwilson
Copy link
Member

@bitsgalore, I've been running scared of this all week but think I have a way forward. I'm going to fork as full a copy of the repo as I can before doing this and keep it somewhere safe. I'll then shrink the main repo, run a few tests here to make sure it works at a fairly superficial level. I'll then force the push over GitHub. My thinking is that if something comes up, we can use the archived fork to recover, though I don't think this will be necessary. Once you give me the go-ahead, I'll make a start.

@carlwilson
Copy link
Member

carlwilson commented May 1, 2020

@bitsgalore, hold that thought, I have a better way. I've forked to opf-attic and opf-labs and will shrink the opf-labs instance now so we can see what we think first.

Caution seems to be justified; I appear to have broken the opf-labs fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A product defect that needs fixing P2 Medium priority issues to be scheduled in a future release
Projects
None yet
Development

No branches or pull requests

2 participants