Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Is there a way to do git gc on remote?

The thing is with GIT Repo, once you hit 2GB limit it won't let you push anything. That means for my case, even though I already deleted large unnecessary files on my local branch history using git filter method, it still requires me to push forcibly the changes which the repo will not allow you anymore because of the said limit reached.

On the other hand, I also did git remote prune method which did not help because it seems I do not have dangling objects on my remote side which is very unlikely knowing the 2GB limit has been reached.


Note: I've also done git reset --hard method in the beginning which probably lost that commit that was reset that has big files.

1 answer

1 vote

Hi JonCarlo,

It is really good that you have tried all the steps at first hand. 

git remote prune will only remove the remote tracking references to remote objects from local repo. git gc is currently run by Atlassian Support team which will remove any dangling commits.
You can raise a support request with Atlassian Support selecting Technical Issues and Bugs option to run a gc on your repository to bring down the repository size. After which you can push your local changes. Please don't forget to mention your repository URL in the support ticket.

Best Regards,

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,787 views 0 7
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