Git LFS
Usa la API REST para habilitar o deshabilitar Git Large File Storage (LFS) para un repositorio.
Acerca de Git LFS
Puedes usar Git LFS para almacenar archivos de gran tamaño en un repositorio de Git. La API REST te permite habilitar o deshabilitar la característica para un repositorio individual. Para obtener más información sobre Git LFS, consulta "Acerca de Git LFS".
Los usuarios con acceso de administrador a un repositorio pueden usar estos puntos de conexión.
El uso de Git LFS está sujeto a facturación. Para más información, vea "Acerca de la facturación para Git Large File Storage".
Si quieres usar estos puntos de conexión para un repositorio que pertenece a una organización, el rol debe proporcionarte acceso a la facturación de la organización. Para más información, consulta "Roles en una organización".
Enable Git LFS for a repository
Enables Git LFS for a repository. Access tokens must have the admin:enterprise scope.
Parameters
| Headers |
|---|
| Nombre, Type, Descripción |
acceptstringSetting to |
| Path parameters |
| Nombre, Type, Descripción |
ownerstringRequiredThe account owner of the repository. The name is not case sensitive. |
repostringRequiredThe name of the repository. The name is not case sensitive. |
HTTP response status codes
| Status code | Descripción |
|---|---|
202 | Accepted |
403 | We will return a 403 with one of the following messages:
|
Code samples
curl \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/OWNER/REPO/lfsAccepted
Status: 202Disable Git LFS for a repository
Disables Git LFS for a repository. Access tokens must have the admin:enterprise scope.
Parameters
| Headers |
|---|
| Nombre, Type, Descripción |
acceptstringSetting to |
| Path parameters |
| Nombre, Type, Descripción |
ownerstringRequiredThe account owner of the repository. The name is not case sensitive. |
repostringRequiredThe name of the repository. The name is not case sensitive. |
HTTP response status codes
| Status code | Descripción |
|---|---|
204 | No Content |
Code samples
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/OWNER/REPO/lfsResponse
Status: 204