Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I removed the large file from bitbucket but still repo size is too large

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?

2 answers

1 vote

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 @DPK J suggested above.

Let me know if you have any questions.


@Daniil Penkin  Can i get which files causing my repo size to be 1.3 GB ?

Yes. There're several ways to do that, here's the one we suggest with a guide.

@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 


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.


0 votes
DPK J Community Leader Feb 27, 2020

@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 -

@DPK J  this tool will clean the local repo or the remote one because i tried this before but i didn't get how it works 

DPK J Community Leader Feb 27, 2020

I suggest you go through Atlassian's KB post that I mentioned, and meanwhile I will try and find some usage link for you.

Here is another important post, this was in my bookmark and I have used to remove file permanently and reduce repo size -

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

525 views 6 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you