在github上传Zip文件并在上传后提取

时间:2017-01-03 07:07:29

标签: github zip

我正在github中导入我的项目,因为它的体积很大,需要很长时间。所以我压缩了我的项目并将其上传到github上。

有没有办法在github上提取它?我无法在其UI中看到任何内容,但是有任何命令或脚本可用吗?

2 个答案:

答案 0 :(得分:2)

我遇到了类似的问题,不幸的是,没有(据我所知)。我可以使用git大文件存储将大文件上传到Github。 (https://git-lfs.github.com/

如果您使用Linux,则以下是说明:

快速安装git-lfs(https://packagecloud.io/github/git-lfs/install

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash

安装Git命令行扩展名。

git lfs install

选择您希望Git LFS管理的大型文件类型的扩展名。对我来说,这是一个“.pb”文件来重新训练inception-v3模型。

git lfs track "*.pb"  #  change "pb" to the extension of your large file.

确保跟踪.gitattributes

git add .gitattributes

最后,像往常一样提交并推送到GitHub。

git add retrain.pb  #  change "retrain.pb" to the name of your large file.
git commit -m "First commit"
git push origin master

或者您可以在项目目录中包含所有文件。

git add .
git commit -m "First commit"
git push origin master

答案 1 :(得分:0)

使用GIT的功能,不要像FTP过去那样上传。 GIT可以帮助您自动跟踪更改,您无需再担心这一点。除此之外,还有大量有用的选项