git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
for subfolder not work please solve download github subfolder project
example
wget https://github.com/User/repo/archive/master/folder.tar.gz
not work return 404 error please solve or propose solution for work
download github subfolder project in tarball
thank you
This solution available.
wget https://github.com/torvalds/linux/archive/refs/heads/master.zip
This previous solution was not available(why?)
$ wget https://github.com/User/repo/archive/master.tar.gz
--2024-06-30 15:22:42-- https://github.com/User/repo/archive/master.tar.gz
Resolving github.com (github.com)... 20.200.245.247
Connecting to github.com (github.com)|20.200.245.247|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-06-30 15:22:42 ERROR 404: Not Found.
Git 2.44 or above support HTTP protocol for git archive
, so you can probably create an archive from remote directly.
This works on git repositories that are not Github
Note that it doesn't work on Github as it appears it doesn't support it isaacs/github#554