Missed Team ’24? Catch up on announcements here.

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

Size of repository doesn't reduce after switching to LFS

Boris Kulagin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 27, 2023

We've encountered an issue where our repository size hasn't decreased after switching to LFS. Our source repository contains several large files such as pictures and archives that we're trying to move to LFS storage. To do this, we've implemented a migration plan with the following steps:

  1. Install git lfs
  2. Clone the repository using 'git clone <repo url>'
    next
    "Allow LFS" option was set to ON in repo settings on Bitbucket server
  3. Navigate to the cloned repository using 'cd <repo>'
  4. Run 'git lfs migrate import --include="*.bin" --everything'
  5. Run 'git reflog expire --expire-unreachable=now --all'
  6. Run 'git gc --prune=now'
  7. Finally, force-push the changes using 'git push --force'

After completing these steps, the .bin files were successfully moved to the LFS storage, but when checking the repository size, it appeared that nothing had changed in addition to the LFS moved files. We've waited for server-side GC for a couple of days, but there hasn't been any change in the repository size. The 'git lfs ls-files' command now shows links instead of specific files. We're currently seeking assistance from the community support forum on how to resolve this issue.

Bitbucket DC server version 7.6.20



 

1 answer

0 votes
Baskar Annamalai April 28, 2023

Hi @Boris Kulagin

Was the repository enabled with LFS in the repository setting as well? Did you go through the following documentation - https://confluence.atlassian.com/bitbucketserver/git-large-file-storage-794364846.html

Best regards,
Baskar Annamalai
ServiceRocket

Boris Kulagin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 28, 2023

Hello

Definitely yes.

"Allow LFS" option was enabled in repository settings after cloning.
Original post has been updated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events