Skip to content

Instantly share code, notes, and snippets.

View Benjamin-Loison's full-sized avatar

Benjamin Loison Benjamin-Loison

View GitHub Profile
@Benjamin-Loison
Benjamin-Loison / downloadGitLfsFiles.md
Created December 19, 2023 02:00 — forked from fkraeutli/downloadGitLfsFiles.md
How to download GIT LFS files

How to retrieve GIT LFS files from GitHub

Retrieving non-LFS files

Through the GitHub API it is possible to retrieve individual files from a Git repository via, e.g. curl. To do so, first retrieve the content information for the relevant file (or folder):

curl https://api.github.com/repos/{organisation}/{repository}/contents/{file or folder path}

For private repositories, authenticate using your username and a personal access token

This file has been truncated, but you can view the full file.
This file has been truncated, but you can view the full file.