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: 

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

Apoka_4k
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Ben
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:

Cheers!

- Ben (Bitbucket Cloud Support)

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events