My Repo Size is now 1.68 GB I removed the large file from all branched from bitbucket locally and remote but still repo size is too large.
Can you please advice how i can clean my remote repo to get the actual repo size?
Hello @Ahmed Shoeib,
Welcome to the Community.
I just ran aggressive garbage collection in your repository, and its size dropped to 1.3 GB. Not sure what was its size before you added that large file. If it is still in the history, you need to rewrite history to remove it completely like @DPKJ suggested above.
Let me know if you have any questions.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. There're several ways to do that, here's the one we suggest with a guide.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Daniil Penkin i got the large file using below command fro the link you shared but can i get also which branch has this files
$ git_find_big.sh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In general it is impossible to say which branch introduced the file, unless your commit graph is very simple. Branch in Git is just a pointer to a commit, once you create another commit on top of that, the pointer is moved. When you merge branches, it is impossible to say, which parent of the merge commit was on which branch.
However you can find commits that modified that big file, then find all current branches (and tags) that have those commits in their history (e.g. commit is reachable from the commit at the brach pointer). Something like this should show all commits for the given file path:
git log --oneline --branches -- path/to/file
You'll then need to rewrite history up to the first commit that introduced that file (in case you want to completely remove it from history). See this section of Pro Git book for details.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ahmed Shoeib Welcome to the community!
Sometimes, some files stay attached in history or Bitbucket periodic cache clean has not kicked in yet to show you size related changes.
At this stage you can use tools like,
You must also read this KB article by Atlassian - https://confluence.atlassian.com/bitbucket/reduce-repository-size-321848262.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@DPKJ this tool will clean the local repo or the remote one because i tried this before but i didn't get how it works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is another important post, this was in my bookmark and I have used to remove file permanently and reduce repo size - https://confluence.atlassian.com/bitbucket/maintaining-a-git-repository-321848291.html
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.