Hi, I've hit the 4GB limit with my repository and am seeking a path to reduce that size while ensuring that my most recent changes are safe.
In going through the documentation steps (https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/) I have done the following:
- Created a temporary branch with my latest commit
- Reset my master branch back to the previous commit
However at this stage I am uncertain how to proceed with reducing my repository size so I can continue making changes. My older changes do not matter to me, it is just important that my most recent commits are backed up. Is there a way to clear my data prior to a provided commit or something along those lines?
Hi @MrConkin,
You mentioned that you started with a new repo without the history and abandoned the old one.
In case you would like to continue with the old repo with the history, I can see the repo that was over the 4 GB size limit. I ran a garbage collection to this repo and its size is 2.8 GB now, so you should be able to push to the repo.
The repo's size is still quite large, so I would suggest reducing it further, if possible. You can check this reply of mine here:
If you decide to rewrite history with BFG to further reduce the repo's size, please keep in mind that the repo's size will get increased again when you push these changes, and the remote repo will need another git gc. I can run it for your repo again then, so that the repo's size gets reduced, just let me know.
Kind regards,
Theodora
That's very helpful, thank you Theodora. I think I will stick with the new repo so I can start fresh with a stringent gitignore. Appreciate the help and offer though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome. If you change your mind or if you have any other questions in the future, please feel free to reach out!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might have a look at following solution:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johannes, thanks for the lead.
That process was going relatively smoothly. I created a shallow clone and a new BitBucket repo, but when I attempt to push the clone to the new repo I get this error. Any advice on how to bypass this would be appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Abandoned that plan and ended up just starting fresh with my latest in a new repo as per:
https://stackoverflow.com/questions/30001304/clone-git-repository-without-history
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.