1

I want to push my repos to Github. However , i stuck on the limit of 100mb each file, so i following the git lfs tutorial and track the big files sucessfully . However , it seems that it still use the normal push for my big files and still get error.

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*
Jake Lam
  • 3,254
  • 3
  • 25
  • 44

2 Answers2

0

It seems like the host site "github.com" does not accept files larger than 50MB. Remember, this is free hosting of your code :) I am sure paid services will let you do what ever you want. I,e,. check in large sized files.

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.

Read more here: 50 MB push warning

z atef
  • 7,138
  • 3
  • 55
  • 50
  • i thought that is why git LFS comes out for . we need to use git LFS for pushing larger than 100mb files. I used it but still got error – Jake Lam Oct 12 '17 at 04:29
0

You have two options:

  1. Subscribe to GitHub's Git Large File Storage - https://git-lfs.github.com
  2. Avoid using Git to track large files; just your codebase.

To remove, use the command below. For the beginning commit ID in the range, replace beginning.

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

This blog has more information.

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

Christia
  • 251
  • 3
  • 18