the warning still appears after I delete branches

hvtransco August 4, 2020

Hi, 

 

I receive a warning that my repository is over 1GB. I tried to delete so many branches that I cloned from the master to reduce the size but it still shows this warning. I think the status is not updated yet or my deletion doesn't affect it.

Please let me know what I should do to get updated after I deleted the source codes to reduce the size.

I appreciate for your help.

Thanks!

Hai

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 6, 2020

Hi @hvtransco, thanks for reaching out!

That's how Git works, even if you delete the branches from your current state, that doesn't mean they're gone as they're still part of the history of your repository. To completely remove files from the repository's history, you can use the third-party tool BFG Repo-Cleaner or the git filter-branch command. That way you'll be altering the history of the repo and the size will indeed decrease. Note that this is the intended behaviour for Git, so if you need more help with the above instructions you'll need to resource to the appropriate support channels for them :)  

Alternatively, you can start a new repository with your current files, so there won't be a history and the old branches will never be part of it.

Hope that helps!

Ana 

hoanvusolutions September 17, 2020

Hi Ana,

Thank you for your help. However, I tried to follow your guides but it didn't work for me.

I followed this guide link https://rtyley.github.io/bfg-repo-cleaner/ to run this command on my MAC Terminal:

java -jar bfg.jar --strip-blobs-bigger-than 100M xmarketplace.git

and I received this error: command not found

Please help.

 

Alternative, I followed this guide link https://git-scm.com/docs/git-filter-branch and run this command on my local git folder: git gc

After finishing, there is nothing happen.  Please let me know what exactly the command line to execute is.

 

Thank you for your help and look forward to hearing from you.

Best Regards,

Lee

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events