首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Git推送大文件获取错误

Git推送大文件获取错误
EN

Stack Overflow用户
提问于 2017-10-12 11:08:05
回答 2查看 1.1K关注 0票数 1

我想把我的回购推给Github。然而,我坚持每个文件100mb的限制,所以我遵循git lfs教程,成功地跟踪了大文件。然而,它似乎仍然使用正常的推送我的大文件,仍然得到错误。

代码语言:javascript
复制
C:\Users\t_lamn\tryThis>git lfs ls-files
89b33caa5b * target/container/tomcat8x/apache-tomcat-8.0.36/webapps/docs/appdev/
sample/sample.war
387faaf5fa * target/container/tomcat8x/cargo-jira-home/webapps/cargocpc.war
08f1d2624b * target/container/tomcat8x/cargo-jira-home/webapps/jira.war
8bf7c2eaad * target/jira/jira-original.war
08f1d2624b * target/jira/jira.war

C:\Users\t_lamn\tryThis>git push origin master
Git LFS: (4 of 4 files) 399.56 MB / 399.56 MB  <- large files
Counting objects: 16371, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (15898/15898), done.
Writing objects: 100% (16371/16371), 732.82 MiB | 2.06 MiB/s, done.
Total 16371 (delta 2850), reused 0 (delta 0)
remote: Resolving deltas: 100% (2850/2850), done.
remote: error: GH001: Large files detected. You may want to try Git Large File S
torage - https://git-lfs.github.com.
remote: error: File target/jira/jira-original.war is 194.38 MB; this exceeds Git
Hub Enterprise's file size limit of 100.00 MB
remote: error: File target/container/tomcat8x/cargo-jira-home/webapps/jira.war i
s 205.17 MB; this exceeds GitHub Enterprise's file size limit of 100.00 MB
To *git link*
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to *git link*
EN

回答 2

Stack Overflow用户

发布于 2017-10-12 12:15:03

主机站点"github.com“似乎不接受大于50MB的文件。请记住,这是免费托管你的代码:)我相信付费服务会让你做任何你想做的事情。I,e,.检入大文件。

代码语言:javascript
复制
Conditions for large files:
GitHub will warn you when pushing files larger than 50 MB. 
You will not be allowed to push files larger than 100 MB.

点击此处阅读更多信息:50 MB push warning

票数 0
EN

Stack Overflow用户

发布于 2017-10-12 12:46:39

您有两个选择:

使用Git跟踪大文件,订阅GitHub的

  1. 大文件存储- https://git-lfs.github.com
  2. Avoid;只需您的代码库。

要删除,请使用以下命令。对于范围中的开始提交ID,请替换beginning

使用git filter-branch --tree-filter 'rm -rf [filename] [beginning]...HEAD

这个博客有更多的信息。

https://dalibornasevic.com/posts/2-permanently-remove-files-and-folders-from-a-git-repository

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46700768

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档