질문에 .../tarball/...
링크가 아닌 최신 .../archive/...
링크를 사용하십시오. 일반적인 형식은 다음과 같습니다 그래서
https://github.com/<group_or_organization>/<repo>/archive/<refspec>.tar.gz
, 예를 들면 :
$ curl -L jttps://github.com/nativescript/docs/archive/production.tar.gz | tar tz
docs-production/
docs-production/.gitattributes
docs-production/.gitignore
docs-production/.gitmodules
docs-production/.vscode/
docs-production/.vscode/settings.json
docs-production/README.md
...
당신은 생성 된 최상위 디렉토리의 이름이 오히려 커밋 ID로 변환보다, 제공 어떤 <refspec>
사용하고 있음을 알 수있다. 마찬가지로
:
$ curl -s -L https://github.com/nativescript/docs/archive/ErikEdits-css-annimations.tar.gz | tar tz
docs-ErikEdits-css-annimations/
docs-ErikEdits-css-annimations/.gitattributes
docs-ErikEdits-css-annimations/.gitignore
...
분기 이름 대신에 다른 git
refspecs를 사용할 수 있습니다.
https://github.com/nativescript/docs/archive/HEAD^.tar.gz
또는 : 예를 들어
https://github.com/nativescript/docs/archive/v2.3.0-20-ged0d16f.tar.gz
그러나 이러한 경우
는 기준
은 커밋 ID로 변환 할 수됩니다.
이것은 curl과 아무 관련이 없습니다. curl은 stdout에 쓰기 때문에 파일 이름에는 아무런 변화가 없습니다. –