Migrating Git LFS files from one remote storage to another remote storage.
Platform Notice: Cloud - This article 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.
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:
git config --global lfs.url <your new LFS storage URL>
Please note that these configurations are specific to the user's client/repository. Users should follow these steps to change their LFS configuration.
If you are encountering issues following this documentation - please raise a support ticket or a community support ticket for further assistance.