I have reduced the size of the following repos:
https://bitbucket.org/ltr-apps/weblearn
https://bitbucket.org/ltr-apps/maple
Locally they are both showing as less than 1 gig.
E93386@Timothys-MacBook-Pro maple % du -sh .
89M .
E93386@Timothys-MacBook-Pro WebLearn % du -sh .
606M .
Can you please run garbage collection on these two repos?
Welcome to the community.
I've run Git GC against those repositories, unfortunately, the size remains the same.
You have a couple of options to resolve this:
Option 1 - Delete & recreate the repositories
This is the fastest way to solve the problem, but loses metadata such as PRs, Pipelines, Permissions, etc.
Perform a clone of those repositories for backup purposes
Delete those repositories from your workspace to free up space and allow you to push. NOTE: This will permanently remove metadata such as PR's/pipelines/user permissions etc.
Identify the largest files in your repositories by executing the following command:
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \| awk '/^blob/ {print substr($0,6)}' \
| sort -r --numeric-sort --key=2 \
| numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
Perform cleanup operations locally to reduce the size
Once complete, push those repositories back to your workspace by creating a blank repository with the same name of the deleted repository, then mirror pushing the contents of the cleaned repository:
HTTPS
git push --mirror https://<username>@bitbucket.org/<WorkspaceID>/<RepoName>.git
SSH
git push --mirror git@bitbucket.org:<WorkspaceID>/<RepoName>.git
NOTE: This will remove metadata such as PR's/pipelines/permissions etc but will keep your commit history and binary files intact.
Option 2 - Temporarily upgrade
Upgrade to a paid plan and utilise our 30-day trial period to restore functionality and provide more time to reduce your repository directly without deletion. You can choose to continue or cease your trial before the end of the 30-day period.
If you encounter any issues during this period - you may raise a ticket directly with our support team using your workspace URL: Atlassian Support
Please let me know how this goes.
Regards,
Mark C
Mark I have done all these steps previously. - my local repo is now Tiny.
This is the output of the command in step 3 (it didnt work on mac, but Claude fixed it)
E93386@Timothys-MacBook-Pro WebLearn % git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| awk '/^blob/ {print substr($0,6)}' \
| sort -r --numeric-sort --key=2 \
| gnumfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
0fba140370c5c7061384789d92ded65c81ef7d41 11MiB aws-ssm-env.static
edb95be5cfb3bbf46422b941d6deba03da026613 2.4MiB Images/ABC123/SCR-20230517-m29.jpeg
99ea9e418ee748ca236966814bb0bf1dcfb57f48 2.3MiB Images/ABC123/SCR-20230809-ihq.jpeg
b3388d20a8d2773b001eebd3211ef1a337335d67 2.2MiB static/mathjax/es5/tex-svg-full.js
654f6e9c74f2b15b2329d8f36f6725d1ee733528 2.1MiB Images/ABC123/SCR-20230731-fu2.jpeg
c29aab240885aae8fff169d284506bceb4105de5 2.0MiB Images/ABC123/SCR-20230511-ko7.jpeg
a5ad86a1adbdeccd646e359758e8e9c46fe5b9d6 2.0MiB static/mathjax/es5/tex-mml-svg.js
aed2086b6c27920ec2c15399cf6d773b33c892b3 2.0MiB static/mathjax/es5/tex-svg.js
ec82d1fe0fe7154aced89a32ec0f438527e956ba 2.0MiB static/mathjax/es5/tex-chtml-full-speech.js
240f03947570425682a909aef7e8ef001af78213 1.9MiB static/mathjax/es5/mml-svg.js
4e271477e9fe1849b631069cbe5e7f22641cd9f5 1.7MiB mimetex.cgi
0bb78819221a3d1f90112e519672a91d8a9d6ec2 1.6MiB build/server/chunks/EditQuestion-c71fdc78.js.map
1aa81818c1469197080448e204915f1cc103868a 1.3MiB Images/ABC123/SCR-20230406-f6w.png
75803c95ab673c88a7778562226d3890c697d5b3 1.3MiB static/mathjax/es5/tex-chtml-full.js
b7da2e525ef24de0ef073cbf98adc60a1f4d5c5d 1.1MiB static/mathjax/es5/tex-mml-chtml.js
35001f253a71603af9f8680e076d08a8c5fe1400 1.1MiB static/mathjax/es5/tex-chtml.js
2020927e889902a668ddb8ec1b72f2557660a796 1.1MiB static/tinymce/tinymce.js
95bf181d0b058c077f5e22955699b443d5d2d286 1.0MiB static/mathjax/es5/output/svg/fonts/tex.js
256db10773f61f0b79aed85a28664152bc0a3b35 1.0MiB static/tinymce/themes/silver/theme.js
1230a9583f0179e5c98a3a683efddef101a8e552 974KiB static/mathjax/es5/mml-chtml.js
94b4a0b760fef653762e1be74ecba580872beb29 840KiB Images/ABC123/SCR-20230310-el5.png
538d75b638c8d15e11fe46a3096a5e61005901c4 746KiB build/shims.js
2a481290e30b77d3e913d31af280c82a784ebcc3 717KiB .svelte-kit/output/client/_app/immutable/chunks/EditQuestion.a4f53bad.js
33c4063ff81542cbc3bb9cb001d20d08b82f4a4b 717KiB .svelte-kit/output/client/_app/immutable/chunks/EditQuestion.f039f569.js
af06beb824e8c51949ea854384146f4ab0ddf98f 712KiB .svelte-kit/output/client/_app/immutable/chunks/Numeric.e7b1b266.js
79e1f49be1801e71eb9bd8f0e06058d83c0eb0dd 712KiB .svelte-kit/output/client/_app/immutable/chunks/Numeric.2789fd71.js
3e1d7dd2892242cbad994b2dbd3e40470ba50f48 686KiB build/server/chunks/EditQuestion-c71fdc78.js
cb829ffceb5be92e8fa914bf5c105023444616e3 680KiB Images/ABC123/SCR-20230519-ebd.png
7c91147b176dd0b2076e5d2a90c326df64354e6f 571KiB src/globalcss/prism.js
61cb1408082c6ea02da8b74cd92b1a89fa2f8af6 511KiB Images/ABC123/SCR-20230731-n8i.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have already paid for a 'standard' plan so I can update the repos - they are now well under the 1 gig limit, and I have confirmed their local size:
E93386@Timothys-MacBook-Pro maple % du -sh .
89M .
E93386@Timothys-MacBook-Pro WebLearn % du -sh .
606M .
(the last repo includes local builds - the actual size is less than 100meg)
Seems crazy that there is no way to reduce the remote size of the repo, other than deleting it and starting again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information.
It could be related to Git caching related to pull requests.
I've already raised a support request on your behalf.
You should receive an email notification about it and let's continue our investigation there.
Regards,
Mark C
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.