---
title: "Update Git LFS preference"
method: PATCH
path: "/repos/{owner}/{repo}/import/lfs"
tags: ["migrations"]
deprecated: true
---

# Update Git LFS preference

`PATCH /repos/{owner}/{repo}/import/lfs`

> **Deprecated.**

You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability
is powered by [Git LFS](https://git-lfs.com).

You can learn more about our LFS feature and working with large files [on our help
site](https://docs.github.com/enterprise-cloud@latest/repositories/working-with-files/managing-large-files).

> [!WARNING]
> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation).

## Path parameters

- `owner` string, required
- `repo` string, required

## Request body

- object
  - `use_lfs` 'opt_in' | 'opt_out', required — Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import.

## Response `200`

Response

- Import — A repository import from an external source.
  - `vcs` string, nullable, required
  - `use_lfs` boolean
  - `vcs_url` string, required — The URL of the originating repository.
  - `svc_root` string
  - `tfvc_project` string
  - `status` 'auth' | 'error' | 'none' | 'detecting' | 'choose' | 'auth_failed' | 'importing' | 'mapping' | 'waiting_to_push' | 'pushing' | 'complete' | 'setup' | 'unknown' | 'detection_found_multiple' | 'detection_found_nothing' | 'detection_needs_auth', required
  - `status_text` string, nullable
  - `failed_step` string, nullable
  - `error_message` string, nullable
  - `import_percent` integer, nullable
  - `commit_count` integer, nullable
  - `push_percent` integer, nullable
  - `has_large_files` boolean
  - `large_files_size` integer
  - `large_files_count` integer
  - `project_choices` object[]
    - `vcs` string
    - `tfvc_project` string
    - `human_name` string
  - `message` string
  - `authors_count` integer, nullable
  - `url` string, uri, required
  - `html_url` string, uri, required
  - `authors_url` string, uri, required
  - `repository_url` string, uri, required
  - `svn_root` string

## Other responses

- `422` — Validation failed, or the endpoint has been spammed.
- `503` — Unavailable due to service under maintenance.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
