Home > Mobile >  GitLFS migration with partial push
GitLFS migration with partial push

Time:10-23

I am trying to migrate history for a repo with large files (>100mb) into GitHub with the following command :

git lfs migrate import --include="*.gif"
git push origin master --force

Uploading LFS objects is successful. I get the following error:

remote: fatal: pack exceeds maximum allowed size (2.00 GiB) error: remote unpack failed: index-pack abnormal exit

I tried to do pushes in chunks with git push origin <commit>:refs/heads/master -f. But one of the files seems to be in the history which was deleted in a later commit.

remote: error: File /World/Maps/map_4.fbx is 337.34 MB; this exceeds GitHub's file size limit of 100.00 MB

This file is not getting tracked under: git lfs ls-files

I have already tried to manually add a line to the .gitattributes. Is there a way to successfully recognise this file or ignore it during push altogether?

CodePudding user response:

You can configure LFS like this:

git lfs track "*.fbx"

This will avoid the error that is related to your map_4.fbx file. Then try pushing to the remote repository again.

CodePudding user response:

I had to execute git lfs push --all origin master to add the additional files that were added later appended into .gitattributes. Partial push is now working.

  • Related