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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.