我正在 github 中导入我的项目,因为它的体积很大,需要很长时间。所以我压缩了我的项目并上传到github。
有没有办法在github本身上提取它?我在它的 UI 中看不到任何东西,但是有任何可用的命令或脚本吗?
小智 5
我遇到过类似的问题,不幸的是,据我所知,没有。我能够使用 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
Run Code Online (Sandbox Code Playgroud)
安装 Git 命令行扩展。
git lfs install
Run Code Online (Sandbox Code Playgroud)
选择您希望 Git LFS 管理的大型文件类型的扩展名。对我来说,这是重新训练 inception-v3 模型的“.pb”文件。
git lfs track "*.pb" # change "pb" to the extension of your large file.
Run Code Online (Sandbox Code Playgroud)
确保 .gitattributes 被跟踪
git add .gitattributes
Run Code Online (Sandbox Code Playgroud)
最后,像平常一样提交并推送到 GitHub 即可。
git add retrain.pb # change "retrain.pb" to the name of your large file.
git commit -m "First commit"
git push origin master
Run Code Online (Sandbox Code Playgroud)
或者您可以将所有文件包含在项目目录中。
git add .
git commit -m "First commit"
git push origin master
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24435 次 |
| 最近记录: |