Request to run "git gc" on a repo

Meuhric
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!
February 26, 2025

Hi there!

I've seen several posts requesting this, so this seems to be the way to go: I think I need "git gc" to be run on my repo. I've been doing some cleanup to try and get its size under 1GB, yet the repo size stayed stuck at 2.19GB.

Let me know if you need any info to identify the repo.

Thank you!

1 answer

0 votes
Phil C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2025

Hello,

Welcome to the community!

I've run garbage collection on the repository, and the repository size has remains the same. 

You can check by running the following command on the local repository:

git count-objects -vH

The "size-pack" will show the local repository size.

Our documentation has additional information on how you can reduce the repository size -Maintain a Git repository

 

Cheers,

Phil

Meuhric
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!
February 27, 2025

Hi Phil,

Thank you for your reply and for running the command!

Looking at that doc, I didn't realize I need to remove the files from the Git history after cleaning them up form the repo. I'll look into doing that then!

Thanks,

Emeric

Phil C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2025

Hi Emeric,

Absolutely! Feel free to let me know if you need to run garbage collection again after removing the files from Git history.

Cheers,

Phil

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events