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

I need a git gc --prune=now on my repository

I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 9, 2024

The size still appears as greater than 4GB despite I reduced it to around 2.5GB.

1 answer

1 vote
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2024

Hi Apoka,

I can see your personal repository is now 3.3GB, I executed a git gc and it did not reduce the size any further. 

I would suggest executing the following command to find a list of your largest files:

  • git rev-list --objects --all \
    | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
    | awk '/^blob/ {print substr($0,6)}' \
    | sort -r --numeric-sort --key=2 \
    | numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest

Once you have those largest files, you can either convert these to LFS or remove them from the repo completely using the BFG Tool:


- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events