gitazure-devopsbitbucketgit-lfs

Importing Bitbucket git repo to Azure DevOps; getting LFS failure at local fetch


Having the same problem and trying to follow steps here:

Importing repository in Azure DevOps with Git LFS

At step 3 in the second answer, I get output that looks correct to me:

$ git lfs fetch source --all
fetch: 35 objects found, done.
fetch: Fetching all references...
Downloading LFS objects: 100% (35/35), 42 MB | 12 MB/s

But no files appear on my local filesystem. I'm pretty sure they have to for the rest of the steps to work, so I'm stuck here until I figure it out.


Solution

  • You need to run git lfs checkout to populate the local folder with the real files after calling fetch.

    Fetch populates the blob in the .git folder, downloading all the content to you local system. The Checkout then replaces all the lfs pointer files.

    Instead of fetch you can also use git lfs pull, which basically performs a fetch followed by a checkout.

    If you're migrating, you don't need to perform the pull or checkout, after downloading the files using fetch, you can push them to the target system using git lfs push --all, but if you want to inspect the files locally, checkout is needed as an in-between step.