Search + K

Command Palette

Search for a command to run...

Sign In

Update Git LFS preference

Deprecated
PATCH /repos/{owner}/{repo}/import/lfs
Copy endpoint
https://api.github.com

You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by Git LFS.

You can learn more about our LFS feature and working with large files on our help site.

[!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.

Parameters

path Path Parameters

Name Type
owner required

The account owner of the repository. The name is not case sensitive.

string
repo required

The name of the repository without the .git extension. The name is not case sensitive.

string

Request Body

application/json required
{ use_lfs: "opt_in" | "opt_out"; }

Responses

200 application/json

Response

interface Import {
vcs: string | null;
use_lfs?: boolean;
vcs_url: string;
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";
status_text?: string | null;
failed_step?: string | null;
error_message?: string | null;
import_percent?: number | null;
commit_count?: number | null;
push_percent?: number | null;
has_large_files?: boolean;
large_files_size?: number;
large_files_count?: number;
project_choices?: { vcs?: string;tfvc_project?: string;human_name?: string; }[];
message?: string;
authors_count?: number | null;
url: string;
html_url: string;
authors_url: string;
repository_url: string;
svn_root?: string;
}

Client Errors

422 application/json

Validation failed, or the endpoint has been spammed.

interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}
[]
;
}

Server Errors

503 application/json

Unavailable due to service under maintenance.

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}