I have a Bitbucket Git Cloud repo that is reaching the 1Gb soft limit. There are not really big files in there (the larger is 20Mb and the following one is 5Mb, and those are not much). So I think that the size of the repo is coming from the history, as we have lot's of files that are changing frequently (some of the files may be changing more than 20 times in a day) since 2015 when we started with this repo.
Is there a way that I can compact the history of the repo to keep for example only the history up to last year? Will this help in reducing the size of it? What are the side effects of it? What is the negative side of doing it?
Can I keep the actual history (before compacted) in a separate repo so that if for some reason we need to dig to commits earlier than last year we still have a way?
Thanks in advance.
You should be able to clean up the history of master with something like rebase -i. There is a good article on that in 15 Seconds to Cleaner Git History.
You must be very careful when doing so. Please head their and our warning:
"Rebase is neat, but it’s dangerous, because it rewrites commit history. If you rebase history that is already living upstream or on other developer’s machines, you’re headed into a world of pain.
Plain and simple, do not rebase commits that you’ve already pushed (unless you are the sole developer–in that case, rebase at will and use
git push -f)."
Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...
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