如何从GitHub下载特定的提交sha.zip? [英] How to download .zip from GitHub for a particular commit sha?

查看:358
本文介绍了如何从GitHub下载特定的提交sha.zip?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想下载一个带有github上托管的库的源文件,但我不想要这个主文件,因为每次下载我都可以下载不同的版本。



这个特定的库没有标签,所以我不能使用它。



那么如何下载source.zip您可以在下载网址中放入您想要的sha:


$

解决方案

b $ b

https://github.com/ {username} / {projectname} / archive / {sha} .zip



一般来说,如果您的网址有效,您可以使用您想要的特定网址替换master。


I want to download a .zip with the source of a library hosted on github, but I don't want the master, because every time I download I could be downloading a different version.

This particular library does not have tags, so I can't use that.

So how do I download the source.zip for a specific commit sha?

解决方案

You can put the sha that you want in the download url:

https://github.com/{username}/{projectname}/archive/{sha}.zip

As a general rule, if you have a url that works, you can replace "master" with the specific sha you want.

这篇关于如何从GitHub下载特定的提交sha.zip?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆