Bitbucket Import existing code using import wizard is omitting LFS files

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

The web repository importer in Bitbucket does not support importing Git LFS files. However, one way to workaround this would be to push the LFS files using the command line instead.

Cause

The requested feature to move LFS files is not available as the LFS files are stored in different storage and have to be manually imported as a workaround.

Solution

Since the LFS files are not migrated using the repo import tool. Hence you would need to re-push the LFS files to the repository by following the below steps:

First, please check if git LFS is installed on your system locally by executing the command:

1 git lfs --version
(Auto-migrated image: description temporarily unavailable)

If not present, kindly install git LFS as instructed in the reference.

Reference: https://git-lfs.github.com/

Next steps:

Create a mirror clone of the source repo containing the LFS files by running the below command:

Source repo containing the LFS files 24.86MB of storage:

(Auto-migrated image: description temporarily unavailable)
1 git clone --mirror <bitbucket repo url>

Changing into the repo:

1 cd repoName

Get all the LFS files from the source repo:

1 git lfs fetch --all origin
(Auto-migrated image: description temporarily unavailable)

Targeted repo, no LFS files present at the moment and 0B used:

(Auto-migrated image: description temporarily unavailable)

Add the targeted repo (where you would like to push the LFS files to) as a remote:

1 git remote add <your_remote_name>  <bitbucket repo url>
(Auto-migrated image: description temporarily unavailable)

Next, please verify if the new remote was properly added:

1 git remote -v
(Auto-migrated image: description temporarily unavailable)

And finally, push the LFS files to the targeted repo:

1 git lfs push --all <your_remote_name>
(Auto-migrated image: description temporarily unavailable)

Conclusion: On the targeted "getme" repo, we can see that the LFS files were successfully pushed.

(Auto-migrated image: description temporarily unavailable)
(Auto-migrated image: description temporarily unavailable)
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.