Moving from bitbucket to self-hosted gitlab, LFS is 0 bytes

243 views Asked by At

I have imported my bitbucket repo into a self-hosted gitlab project. Everything seemed to work fine, but when I check the project info, the project is only 94mb and LFS is 0 bytes. In bitbucket when I check LFS info, there's about 800mb of data.

Seems the import does not include LFS? What is the easiest way to fix this?

1

There are 1 answers

0
Mark Adelsberger On BEST ANSWER

I assume you have gitlab set up to work with LFS. Info here: https://docs.gitlab.com/ee/workflow/lfs/manage_large_binaries_with_git_lfs.html

Whether there's a way to include LFS in the import, I don't know; but since you've already done the import of the core repo, it may be as well not to worry about that.

You can use a local repo as a go-between to get all the LFS objects into gitlab. This may be time consuming due to the volume of data involved. In a clone of the original repo, you would do a git lfs fetch --all (which is documented as being "primarily for backup or migration purposes").

Then you would update your local repo's remotes (and, important to remember if it's set separately, LFS URL) to refer to the new repo, and do a git lfs push --all