We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the new Branches, Collaborators, Commits, Deploy Keys, Deployments, GitHub Pages, Releases, Metrics, Webhooks REST API pages.
Git LFS
Puedes habilitar o deshabilitar Almacenamiento de archivos de gran tamaño de Git (LFS) para un repositorio.
Acerca de la API de Git LFS
Puedes usar Git LFS para almacenar archivos de gran tamaño en un repositorio de Git. La API de Git LFS 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".
Las personas con acceso de administrador a un repositorio pueden usar la API de Git LFS.
Enable Git LFS for a repository
Enables Git LFS for a repository. Access tokens must have the admin:enterprise scope.
Parámetros
| Headers |
|---|
| Name, Type, Description |
acceptstringSetting to |
| Path parameters |
| Name, Type, Description |
ownerstringRequiredThe account owner of the repository. The name is not case sensitive. |
repostringRequiredThe name of the repository. The name is not case sensitive. |
Códigos de estado de respuesta HTTP
| status code | Descripción |
|---|---|
202 | Accepted |
403 | We will return a 403 with one of the following messages:
|
Ejemplos de código
curl \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/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.
Parámetros
| Headers |
|---|
| Name, Type, Description |
acceptstringSetting to |
| Path parameters |
| Name, Type, Description |
ownerstringRequiredThe account owner of the repository. The name is not case sensitive. |
repostringRequiredThe name of the repository. The name is not case sensitive. |
Códigos de estado de respuesta HTTP
| status code | Descripción |
|---|---|
204 | No Content |
Ejemplos de código
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/lfsResponse
Status: 204