0

i'm trying to do a LFS push but this doesnt seem to work for me

I used following commands

git lfs install 
git lfs track "X" 
git add .gitattributes
git commit -m "LFS added"
git push origin main

this didnt seem to work so i refered to a topic on SO and used following comments

git config --global lfs.allowincompletepush true
git lfs push --all origin main

That didnt seem to work either after trying to push again so i tried:

git config --global lfs.contenttype 0

Still not solved? any ideas?

Error for those wondering:

remote: Resolving deltas: 100% (11082/11082), done.
remote: error: Trace: a0c4773907c1208cb55f235c3169f15af2f3bf0000300aba7f3a687ffd0589e1
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Library/ArtifactDB is 128.00 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/JannickOste/Camelot2D
 ! [remote rejected]   main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/JannickOste/Camelot2D'
SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34
  • Does this answer your question? [Git lfs - "this exceeds GitHub's file size limit of 100.00 MB"](https://stackoverflow.com/questions/33330771/git-lfs-this-exceeds-githubs-file-size-limit-of-100-00-mb) – SwissCodeMen Dec 21 '21 at 20:43
  • @SwissCodeMen This doesnt seem to work either :( –  Dec 21 '21 at 22:11

1 Answers1

2

git lfs track does not cause files that are already committed to be turned into LFS files. It only has effects on files that were added to the index or committed after the command was run.

If you want to change the history, you need to run git lfs migrate import --everything --include='X' (where X is the file pattern you want).

Note that you should disable lfs.allowincompletepush because if you're not careful, you can end up failing to push data and if there's not another copy, you can experience data loss.

bk2204
  • 64,793
  • 6
  • 84
  • 100