The modernized way of doing this is:
curl -sL https://github.com/user-or-org/repo/archive/sha1-or-ref.tar.gz | tar xz
Replace user-or-org
, repo
, and sha1-or-ref
accordingly.
If you want a zip file instead of a tarball, specify .zip
instead of .tar.gz
suffix.
You can also retrieve the archive of a private repo, by specifying -u token:x-oauth-basic
option to curl. Replace token
with a personal access token.