My repository size is 4.1 GB even though I've cleared it to the initial commit. Manual git gc doesn't seem to work. I saw one person posting a question to the community and ATLASSIAN TEAM member gave a hand on this. Can someone check into my rep the same way?
Hi @Даниил Тимофеев and welcome to the community.
I ran a git gc for the repo that was over the 4 GB limit, its size is 79.0 KB now.
Does this agree with the size of your local repo, if you run git count-objects -Hv?
Kind regards,
Theodora
Many thanks to you for such a hasty response!
But as I see it, such situations may happen again and again.
I'm trying to look now for the options how to fix that.
As I see, the majority of the weight of the project was in the .git .pack file.
I understand that it might not be your sphere of knowledge since you are on ATLASSIAN TEAM, not GIT, but you may have encountered it already?
Along with all the information available online, what can you say is the problem there?
Numorous and heavy-weighing commits, some files that should have been put into .gitingore file, or something more?
And also, can I run git gc somehow on the server side, not to disturb you and your team members? Because as I understand it, launching this command locally wont help much if I cant push the result to BITBUCKET (4GB restriction)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Даниил Тимофеев ,
You are very welcome, I'm glad to have helped.
The git pack file is the file where files and the history of the repository are saved. If this is large in size, it is possible the repo has some large/binary objects, or it could also be due to a very large history. It's hard to say without examining the repo.
You can check my reply to another user's question here:
I share details on how to identify any large files in the repo and also the two options of 1) removing such large files from the repo's history 2) alternatively, track these files with Git LFS if they need to be versioned
If certain large files don't need to be versioned and you remove them from the repo's history, it may be best to add them in .gitingore afterwards, so they don't get committed to the repo again.
At the moment, I'm afraid it is not possible for users to trigger a git gc on their remote repos. We have a feature request about this in our issue tracker:
I would suggest adding your vote to the feature request, and you can also add yourself as a watcher if you'd like to get notified via email on updates.
The automated git gc will run in the following case at the moment:
If all 3 conditions apply, then an automated git gc should get triggered. This is also mentioned in our docs here:
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.