We are experiencing an issue with our Bitbucket Git repository where the repository size has grown to approximately 2.9 GB.
After running the following command locally:
git count-objects -vH
we observed that the large size is primarily due to Git historical objects (blobs) stored in the repository history, rather than files in the current working directory.
Observations:
Working directory size is normal.
Large files appear to have been committed in the past.
unable to Git clone
CI/CD pipeline execution time has increased.
Repository performance is degraded.
Troubleshooting Performed:
Checked repository size using Git commands.
Identified large blobs in Git history.
Reviewed .gitignore to prevent future large file commits.
Assistance Required:
Best practice to safely reduce repository size.
Whether Bitbucket provides any server-side cleanup options.
Any risks or recommendations before rewriting history and force pushing.
This issue is impacting development workflow and pipeline performance. Kindly provide guidance on the recommended resolution.