Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to reduce the size of the repo

motieno May 13, 2022

I have tried more than 100 times to reduce the size of my repo but am unable. I actually deleted the huge file that was problematic but still the size is not going down! What else can I do?

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 16, 2022

Hi @motieno,

A garbage collection may help reduce the repo's size. End users cannot run this for their remote repos, but I can help.

Could you please let me know the following so I can identify the repo and run a git gc for it?
- the last 2 letters of the repo name
- the last 2 letters of the workspace this repo belongs to
- and the size that you see for this repo on Bitbucket website (you can find that in Repository settings)

Kind regards,
Theodora

motieno May 16, 2022

Last two letters of repo: ce

Last two letters of the workspace: no

Size: 4.83 GB

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 16, 2022

Hi @motieno,

I ran a git gc for this repo and its size has been reduced to 3 GB.

Does this agree with the size of your local repo if you run git count-objects -Hv ?

You should be able to push to the repo now, but its size is still quite large, so I would suggest reducing it further, if possible.

You can check the following reply I gave to another community question for more details:

As I mentioned in that reply, if you proceed with history rewrite and push to your repo, it will need another garbage collection. You can let me know, and I can then run it.

Kind regards,
Theodora

motieno May 16, 2022

My only worry is even after trying to reduce the pack size by removing the large file that caused the challenge, the local repo is still huge. I actually separated the project files but still the pack size is still big

motieno May 16, 2022

I however confirm that the size of the local repo is close to the remote repo. Many thanks

motieno May 16, 2022

The push is on. At 25% I will request for garbage collection shortly

motieno May 16, 2022

The size has shot again to past 3.54GB, however my local repo is 2.77 GB 

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2022

Hi @motieno,

I ran another git gc for the repo and its size is 2.9 GB now.

  1. What operation did you perform to remove the large file from the repo?
    Did you commit the file's deletion?
    Or did you rewrite history to remove it?

  2. If you open this repo on Bitbucket website and then its Commits page, do you see there the commit with the large file?
    If yes, can you select this commit to open it, and let me know if you see the large file listed there?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events