Fix rejected push - Convert demo.mp4 to Git LFS
The problem:
GitHub rejected the push because demo.mp4 (108MB) exceeds the 100MB limit.
Solution on your local system:
-
Install and setup Git LFS:
git lfs install
-
Track the video file:
git lfs track ai4mbse/demo.mp4
-
Add the video to LFS:
git add ai4mbse/demo.mp4 git add .gitattributes
-
Amend the rejected commit:
git commit --amend -m "Move demo.mp4 to Git LFS and add configuration"
-
Force push the corrected commit:
git push --force-with-lease
Alternative (if that doesn’t work):
-
Remove the video from the rejected commit:
git reset --soft HEAD~1 git reset ai4mbse/demo.mp4
-
Commit without the video first:
git commit -m "Add Git LFS configuration" git push
-
Then add the video with LFS:
git lfs track ai4mbse/demo.mp4 git add ai4mbse/demo.mp4 .gitattributes git commit -m "Add demo.mp4 via Git LFS" git push
The video will then be stored in Git LFS and GitHub will accept it!