GitHub 不允许我上传大文件

GitHub is not letting me upload a large file

我已经下载了 LFS 和 运行 将 *.mp4 文件添加到 .gitattributes 的适当命令。推送后,出现此错误:

C:\servo>git push
Uploading LFS objects: 100% (1/1), 483 MB | 1.4 MB/s, done.
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (9/9), 461.00 MiB | 1.27 MiB/s, done.
Total 9 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 1 local object.
remote: error: Trace: adb804884f553140d5388afb59d15f48fad63e9bd5410e814cfc79929a1fda90
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Videos/initial_testing.mp4 is 461.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/gabemorris12/Servo-Laser.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/gabemorris12/Servo-Laser.git'

文件大小为 483 MB。那应该不会太大。我还能做些什么来推动它?视频已经按照我的喜好压缩了。

这是我的一系列命令:

git lfs track "*.mp4"

这会自动创建一个包含以下文本的 .gitattributes 文件:

*.mp4 filter=lfs diff=lfs merge=lfs -text

那我运行:

git add .
git commit -m "my message"
git push

找到 后,我解决了这个问题。 post 让我想到在尝试推送视频之前将 .gitattributes 文件推送到存储库。

I 运行 git reset commit_hash_before_video 回到视频提交和 .gitattributes 提交之前。我 运行 git add .gitattributes git commit -m "added .gitattributes" git push 在推送视频之前推送该文件。然后我运行git add .git commit -m "added video"git push。视频通过了。