我想将我的回购推向Github。但是,我坚持每个文件100mb的限制,所以我按照git lfs教程并成功跟踪大文件。但是,它似乎仍然使用正常推送我的大文件仍然会出错。
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*
答案 0 :(得分:0)
它似乎是主机网站&#34; github.com&#34;不接受大于50MB的文件。请记住,这是免费托管您的代码:)我相信付费服务将让您做任何您想要的。 I,E ,.检查大文件。
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
答案 1 :(得分:0)
您有两种选择:
要删除,请使用以下命令。对于范围中的起始提交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