Bitbucket LFS Media Adapter

Take Git LFS to the next level

Bitbucket's LFS Media Adapter is a custom Git LFS transfer agent that enhances uploads and downloads of Git LFS files. The Bitbucket LFS Media Adapter utilizes our native Media APIs to provide you faster uploads and downloads through chunking, de-duplication and parallelization of chunks. Follow these easy steps to speed up your LFS file transfers.

Features

  • Resumable uploads and downloads – Continue where you left off and say goodbye to unreliable file up- or downloads.
  • Chunking – Instead of choking on large files they are chunked into smaller pieces.
  • Increased parallelism – Chunks of large files are transferred in parallel to make your uploads and downloads faster.
  • De-duplication – When changing large files only the changed chunks are uploaded, skipping all chunks that remain the same.
  • Same workflow – Continue to work as usual with Git LFS, no need to change.

 

Get started

1. Download and Install the Git LFS (Git LFS 1.3+) from https://git-lfs.github.com/

2. Download and extract the Bitbucket LFS Media Adapter

3. Run the following command in your terminal

git config --global lfs.customtransfer.bitbucket-media-api.path /path/to/git-lfs-bitbucket-media-api

 

You can now continue to use Git LFS as usual and enjoy faster uploads and downloads!

 

 

 

FAQ

 What is a custom transfer agent?

Git LFS supports multiple ways to transfer (upload and download) files. In the core client, the basic way to do this is with a one-off HTTP request using the URL returned from the LFS API for a given object. In addition to the standard way to transfer files, it is possible to extend the core client to allow enhanced file transfers.

Who developed the Bitbucket Customer Media Adapter?

Git LFS itself is an open source extension to version large files. The Bitbucket LFS Media Adapter uses Atlassian's Media APIs to enhance LFS uploads and downloads and was developed by Atlassian's Steve Streeting. 

What does the Bitbucket LFS Media Adapter actually do?

This adapter implements a custom protocol between Git LFS and Bitbucket's media storage system that takes advantage of better parallelism, and de-duplication of chunks of data. Modified files may not need to be uploaded in their entirety if only parts of them have changed for example.

Will this affect any other Git servers I use?

No. It simply makes the custom protocol available, and Git LFS only uses it if the server signals its support (which only bitbucket.org does). You can install it and continue to work with any server, but you'll only benefit when you use bitbucket.org.

How can I see what it's doing?

Running any Git LFS command with `GIT_TRACE=1` will output debug information which shows the adapter being used. Note that bitbucket.org will only enable the adapter when at least one file is larger than 4MB, since it only benefits larger files.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport