The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

GC request

Pau Vidal Escudero
February 10, 2025

 

Hi,

Since it seems I'm over 4GB size limit, could you please run GC on my repo: <redacted>?

It's a fork of the original where I've run BFG, so it should be reduced.

Thank you very much.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2025

Hi @Pau Vidal Escudero and welcome to the community!

I ran a git gc for your repo. The repo size was less than 4 GB but it remained unchanged after the git gc at 3.5 GB.

Were you expecting a smaller size after you ran BFG? If so, could you please take a mirror clone of the repo and check the size of that, so that we understand if the size is correct?

1. You can take a mirror clone with the command

git clone --mirror <repo_url>

This will clone a bare repo with all remote branches and no working directory.

2. Navigate to the directory of the mirror clone and run the command

git count-objects -Hv

What is the output you get from this command?

Just a heads up, I removed the repository name from your post for privacy reasons.

Kind regards,
Theodora

Pau Vidal Escudero
February 12, 2025

Hi,

after doing the mirror, counting the objects give the 3.5GB

git count-objects -vH
count: 0
size: 0 bytes
in-pack: 55834
packs: 1
size-pack: 3.46 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes


In my previous local folder (where I've done the BFG) I get:

git count-objects -vH
count: 0
size: 0 bytes
in-pack: 54260
packs: 1
size-pack: 105.14 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

After the BFG I did:
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git repack -a -d --depth=250 --window=250
git push --force

Probably I'm missing something...

 

Thank you very much for your feedback

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2025

Hi Pau,

If the mirror clone also shows a size of 3.5 GB, then I believe some large files haven't been removed from history.

Did you run BFG on a mirror clone of the repo? A regular clone (without the --mirror flag) will only fetch the repo's main branch and then BFG won't clean the whole repo. I see that BFG's instructions also mention running it in a mirror clone.

Another thing to note is that BFG by default won't modify the contents of your latest commit on your master (or 'HEAD') branch, unless you use the --no-blob-protection flag. This is mentioned in the same BFG documentation, in the section titled Your current files are sacred....

If you didn't run BFG on a mirror clone, I suggest running it again on a mirror clone. You could also use the flag --no-blob-protection so that large files get removed from the HEAD as well. Then, you can push your changes first to a newly created repo, to check its size, and inspect the repo (are all branches there? have the large files been removed?). If it looks ok, you can then do another force push to the repo you use now (you can then delete the newly created one).

Please do take a backup of your repo before pushing anything (a mirror clone that you keep somewhere safe), in case anything goes wrong with the process.

Kind regards,
Theodora

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events