Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

cant move a repository to another workspace because of git LFS

deckers91 June 21, 2025

Hi, when trying to move my repository to another workspace I get the error msg

 

You can't transfer this repository because it has Git LFS files.

I use the web interface in

https://bitbucket.org/<workspace>/<repo>/admin

Repository details > Manage repository button

 

So while I guess there are reasons for this, how do I solve this problem? I need / want to move my repo from workspace A to B.

 

1 answer

1 accepted

1 vote
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 23, 2025

Hey @deckers91 

Unfortunately, you can't transfer the repository if LFS files are present. However, don’t worry. You can follow these simple steps to address this issue:

  1. Clone the repo locally and change directory into the repository
    git clone --mirror <repository_url>
  2. Fetch the LFS files to the local copy
    git lfs fetch --all
  3. Delete the LFS files from the source repo in the UI. It should be under repository settings > Git LFS
  4. You should now be able to transfer the repository to WorkspaceB
  5. Once transferred, update the URL for the local repository you cloned earlier 
    git remote set-url origin <new-git-url>
  6. Push the LFS back to the new repository location
    git lfs push --all

I hope this helps!

Regards,
Syahrul

deckers91 June 24, 2025

(I cant test this right now, Ill try this weekend. Thanks!)

Like Syahrul likes this
deckers91 June 28, 2025

And it's done! The guide worked without a hitch!

Only in the last step, when trying to push the lfs, git told me that I should:

```
$ git lfs push
Specify a remote and a remote branch name
```

Which can be solved with:

```
git lfs push origin master --all
```

Now everything has been successfully moved to a new workspace.

Thanks!

Like Syahrul likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events