1

I have a repo when cloned is 43GB where the src files are just 2GB. ./git/objects folder is 41GB in total. I did some cleaning to remove the large files from history and was able to reduce the size of repository to 3.6GB in local. Now, I want to push these changes to remote and I tried the below commands, but I'm seeing Everything up-to-date because there are no changes to src files.

git push origin --force --all
git push origin --force --tags
git reflog expire --expire=now --all
git gc --prune=now

After running the above commands, When I clone the repository, it's size is 43GB. How can i overwrite the .git folder in remote ?

The remote is hosted on bibucket.

LeGEC
  • 46,477
  • 5
  • 57
  • 104
  • what service hosts your remote ? github ? gitlab ? ... – LeGEC Feb 22 '23 at 04:26
  • for example: [github documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository) (link found [in this answer](https://stackoverflow.com/a/21364721/86072)) indicates that you should contact github support to ask them to run a gc action on their side. With gitlab, on self-managed repositories you will have a [housekeeping action](https://docs.gitlab.com/ee/administration/housekeeping.html#manual-trigger) -- I guess in SaaS mode it will require asking customer support. etc ... – LeGEC Feb 22 '23 at 04:32
  • The repository is hosted on bitbucket, Atlassian tool. – Shesha Chandra Feb 22 '23 at 05:01
  • ok, search for "bitbucket git gc" or "bitbucket housekeeping", and look for how to have a gc on the server side – LeGEC Feb 22 '23 at 05:06

0 Answers0