Sample - GitHub REST API
PATCH/repos/{owner}/{repo}/import/lfsDeprecated

Update Git LFS preference

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.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 1 body field
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
use_lfsstringrequired
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.
Allowed:opt_inopt_out

3 status codes
200Response
vcsstringrequired
use_lfsbooleanoptional
vcs_urlstringrequired
The URL of the originating repository.
svc_rootstringoptional
tfvc_projectstringoptional
statusstringrequired
Allowed:autherrornonedetectingchooseauth_failedimportingmappingwaiting_to_pushpushingcompletesetup
status_textstringoptional
failed_stepstringoptional
error_messagestringoptional
import_percentintegeroptional
commit_countintegeroptional
push_percentintegeroptional
has_large_filesbooleanoptional
large_files_sizeintegeroptional
large_files_countintegeroptional
project_choicesarray<object>optional
messagestringoptional
authors_countintegeroptional
urlstringrequired
html_urlstringrequired
authors_urlstringrequired
repository_urlstringrequired
svn_rootstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
503Unavailable due to service under maintenance.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 422 is returned: Validation failed, or the endpoint has been spammed. A 503 is returned: Unavailable due to service under maintenance.