2

I have Git-LFS installed and if you check the log bellow you can see that Git-LFS is tracking all the files that I'm trying to upload but still give me the file bigger than limit error. So what is the problem?

C:\***\Immortal-Dawn [Programming +0 ~1 -0 | +126 ~4 -0 !]> git push origin Programming
Counting objects: 152, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (109/109), done.
Writing objects: 100% (152/152), 357.06 MiB | 727.00 KiB/s, done.
Total 152 (delta 85), reused 80 (delta 21)
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: c8d3b4fb7b9d8e6bdb74d5af30a9f9ee
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File ImmortalDawn.sdf is 311.94 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File Plugins/NPC Plugin/Intermediate/Build/Win64/UE4Editor/Development/NPCPluginCore/NPCPluginCorePCH.h.pch is 149.50 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File Plugins/Test/Intermediate/Build/Win64/UE4Editor/Development/Test/TestPrivatePCH.h.pch is 354.06 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File Intermediate/Build/Win64/UE4Editor/Development/ImmortalDawn/ImmortalDawn.h.pch is 698.56 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://***/Immortal-Dawn.git
 ! [remote rejected] Programming -> Programming (pre-receive hook declined)
error: failed to push some refs to 'https://***/Immortal-Dawn.git'

C:\***\Immortal-Dawn [Programming +0 ~1 -0 | +126 ~4 -0 !]> git lfs track
Listing tracked paths
    *.pch (.gitattributes)
    *.sdf (.gitattributes)
    *.sdf,*.pch (.gitattributes)
    *.psd (.gitattributes)
    ImmortalDawn.sdf (.gitattributes)
Daniel Sega
  • 323
  • 2
  • 7
  • 19

2 Answers2

0

for me it looks like the file is not uploaded to lfs location. If you push files to the correct lfs storage, you get output as follows:

LFS: 12.58 MB / 12.58 MB  100.00 %

In my opinion you should check you .gitconfig file inside your repository. there should be a line added like this:

[lfs "http://User@localhost:7990/scm/plt/reponame.git/info/lfs"]
access = basic

The URL might look different on GitHub. Also you should check if your Repository (serverside) got LFS enabled.

Frossy
  • 448
  • 7
  • 17
0

I have a similar problem where I have added some files that are over the size limit to git-lfs with git lfs track, but the push is still rejected. The difference from your output is that I get a line saying (e.g.):

Uploading LFS objects: 100% (88/88), 251 MB | 1.2 MB/s, done.

before

remote: error: GH001: Large files detected.

When I do git lfs track to check what is being excluded, I get:

❯ git lfs track
Listing tracked patterns
    *.csv (.gitattributes)
Listing excluded patterns

which is slightly different from your output (yours says Listing tracked paths and mine says Listing tracked patterns), so you may have a different version of git-lfs.

As to why the push is still rejected, according to this issue: Failing to push large files · Issue #1933 · git-lfs/git-lfs, you have to add the files to git-lfs before they are added to the repo.

You can rewrite the history manually as described in that thread or use BFG Repo-Cleaner to do it automatically (I haven't tried this yet...).

EDIT: Apparently you can use git lfs migrate import to add files to lfs that were already in the repo, without rewriting history: Migrating existing repository data to LFS. See also this SO thread: git lfs - What does git lfs migrate do?

drkvogel
  • 2,061
  • 24
  • 17