Search code examples
gitgithubgit-lfs

Unable to git push even after git lfs install


Scenario 1:

  • Tried to push file size > 100MB in github
  • File > 100MB not allowed to push.Valid error. Agreed
  • ok,use git lfs
  • Still same error
  • whats wrong here
  • Below pics related to Scenario 1

Scenario 2:

  • Cloned a new repo
  • Created a new file > 100 MB
  • Not yet pushed. I know it will be a problem
  • do the git lfs install&track of big file and do git add&commit
  • now if i git push, success, all ok . No issues. I can see the big file in github
  • check it in https://github.com/sivakumar-j-secondary-ac/scenario-2

so What's wrong in the "Scenario 1", if git lfs is working in scenario-2

enter image description here

enter image description here

enter image description here

enter image description here


Solution

  • You will have to explicitly migrate them into Git LFS with

    git lfs migrate import --include="path_to_file

    instead of just tracking. Tracking does not work when files exist in the repository.

    Hope this helps.