Migrating Git LFS files between remote storages

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

Summary

While Bitbucket Cloud officially supports default storage for LFS, users may also utilize third-party storage systems for LFS storage. This guide will help users to migrate from, for example, Bitbucket cloud default LFS storage to another remote storage.

Solution

To switch the LFS URL, users can employ the following Git config command. This will update the .lfsconfig file inside the repository and point the LFS storage remote URL to a different remote storage.

1 2 3 4 5 6 7 8 9 git config lfs.url <your new LFS storage URL> #Eg: To switch to artifactory URL: git config lfs.url https://<USERNAME>:<PASSWORD>@<DOMAIN>.jfrog.io/artifactory/api/lfs/<REPO-NAME> #To switch to bitbucket cloud URL from a different storage URL: git config lfs.url https://<username>@bitbucket.org/workspace/repo.git/info/lfs

For global configuration that applies to all repositories for a user, this information can be stored in the home directory:

1 git config --global lfs.url <your new LFS storage URL>

Please note that these configurations are specific to the user's client/repository. To change their LFS configuration, users should follow these steps.

Updated on March 4, 2025

Still need help?

The Atlassian Community is here for you.