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.
We are using Bitbucket Server.
The shrink process is as follows:
git reflog expire --expire=now --all
git repack -A -d
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.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs