You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Dear Bitbucket support team,
We have a repo that has over 2 GB (thus the warning).
I wasn't quite 100% sure on the sequence of git commands to run to first delete select large files and clean the history. I was able to clean it following the instructions below and removed large CSV files from my repo delete_history_test. The repo is still 66MB and should be much smaller. Can you run the GC on that repo, so I have proof that these instructions work? After which I'll talk to my team to clean up our repo and I suppose we will need to trigger a GC next week.
What I wanted to have is
The large files exist in both the main and the infected branches, so I did:
Then, I clean the history doing:
git filter-branch -f --prune-empty --index-filter "git rm --cached -f --ignore-unmatch large_file.csv" --
I suspect after this point, all of the histories should be clean and I need to trigger the GC from the remote which I can't trigger.
Can you trigger it to this repo delete_history_test so I can make sure it works?
In your first post, you mentioned that the repo has more than one branch.
1. Does your clone (where you executed git count-objects -Hv) have all branches locally?
If you haven't pulled all remote branches locally, then the local repo will be of a smaller size.
2. Could you please take a mirror clone of the repo delete_history_test
git clone --mirror <repo_url>
and then run git count-objects -Hv in that mirror clone, and let me know what the output is?
Hi @Theodora Boudale
Initially yes it had more than one branch. In the meantime I had discovered that maybe I could use LFS to move those files there, and I tried to play around with it. At one point in time, the repo went down to 60 KB when I had first created another branch and installed LFS and added the gitattributes for CSV files, but after merging it, the repo went back to 66MB. I tried to reproduce but I couldn't. In the end I deleted the LFS file and tried to clean it up to bring it back to that initial state.
Here's a screenshot of the commands you told me to run:
Thank you for the info.
Since the mirror clone also shows a size of 8.96 KB, we will need to inspect the remote repo to see what takes up extra space.
I cannot access your repo in order to check that, we need a support ticket in order to be able to access a remote repo.
I see that the test repo delete_history_test belongs to your personal workspace, but there is no other repo there over 2 GB.
I also see that you are a member of a workspace on a paid billing plan.
Does the repo that has a size of over 2 GB belong to that workspace?
If so, what you can do is:
However, if delete_history_test repo is not related to a repo on that paid workspace and it's your personal repository, please feel free to let me know and I can create the support ticket for you.