To upload large file to GitHub, follow the following steps,
1. Install and select LFS file
git lfs install
# I am adding the deep learning model file
git lfs track "*.h5"
2. Commit and push to the GitHub
git lfs push --all origin main
git add .
git commit -am "add large file"
git push -u origin main
Solve large file upload issue
If you already tried to upload the file and facing remote: error: File model.h5 is 270.75 MB; this exceeds GitHub's file size limit of 100.00 MB similar issue, It can be solved by following method,
1. Reset git
git reset HEAD~<HOWEVER MANY COMMITS YOU WERE BEHIND>
If you want to go before one commit:
git reset HEAD~1
Pro Tip: Check git log: git log
2. Check status and push
git status
git push
Top comments (2)
Thankyoouuuuu so much
Thank you