Forums

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

Request to run "git gc" on a repo

Meuhric 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!

2 answers

1 accepted

0 votes
Answer accepted
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 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

Meuhric March 10, 2025

Hi Phil,

It took me a while, but I did the deed. Would you be able to run GC on the repo again?

Thank you,

Emeric

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

Hi Emeric,

Great work! I've run garbage collection again and the repository size has reduced to 1.5 GB. 

Cheers,

Phil

Meuhric March 11, 2025

Thanks a lot! Looks like I need to do some more cleanup then (I'm trying to get the repo under 1GB), so I might have to ask you for another GC in a bit, if that's okay.

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

Hi Emeric,

Not a problem! Just let me know. 

This knowledge base article may be helpful in identifying potential large files in the repository - How To: Check your repository's size and identify large files

Cheers,

Phil

 

Meuhric March 13, 2025

Hi Phil,

We did some more cleanup, I think the repo size should be good now. Could you please run GC once more? Hoping it'll be the last time. :)

Thanks,

Emeric

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

Hi Emeric,

Awesome! I've run garbage collection again and the remote repository size is below 1 GB at 730.6 MB. :D

Cheers,

Phil

Meuhric March 13, 2025

Great, mission accomplished! Thank you for you help. :)

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