We have a very large repository and have gone thru the steps of trying to shrink it (using BFG to remove unneeded large files) and ran it fine against a clone repository. But when running it against an actual copy of the existing repo (file copy, not clone), it doesn't shrink as much. The common suggestion I've seen is to clone it. I'm fine with this, but here's the question. If I want to replace the Bitbucket git directory with my newly shrunken clone, which files need to remain (i.e. repository-config, config, description, hooks).
Hi Richard! I'm not sure if I understand your question completely, you'd like to replace your large repository by the repo you've already shrunk, is that correct?
If that's the case, is there any reason why you can't simply clone your reduced repo and remove the larger one? Or run the BFG on the actual repo you want to shrink?
Also, remember to tell us whether you're using Bitbucket Cloud or Server.
Regards,
Ana
We are using Bitbucket Server.
The shrink process is as follows:
BFG
git reflog expire --expire=now --all
git repack -A -d
git clone
When run on a mirror clone of the repo, I get a repo around 600 MB. When run on a copy of the repo as a trial (we shut down BB and copied the literal files), the repack doesn't shrink it nearly as much (only down to 3 GB or so).
So I want to mirror clone the repo, run the shrink, and then replace the repo on the BB with my clone. But I imagine some of the files in that directory are more related to Bitbucket server and not part of the Git repo itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.
Get Certified! ✍️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.