简体   繁体   中英

git push origin master doesn't register changes to repo

So I'm trying to publish my personal website using Github Pages. It originally had a couple of video files, but Mr.Terminal told me git doesn't allow files of that size and I conceded. I removed the files, "git add"-ed the folder, and committed the changes. When I type in "git push origin master", however, it still gives me the same error. Am I approaching this wrong?

在此输入图像描述

Git isn't intended to store large binary files--it's source control. Github is a Git repo (as well as a number of productivity tools) and it's core functionality is tied to supporting Git repo functionality.

The screenshot in your post clearly shows you're trying to add 2 files that exceed the hard 100MB limit Github imposes.

You also have one file over the 'recommended' limit of 50MB.

Here's the answer:

In case you don't have an important history of changes, it will be simpler to create a new local repository with your files.

The problem is with a history of git repository - if you once added a binary file to the git repository, it will be saved in the history forever (and will take a space too). You can delete the file by command git rm my-binary-file and it will be delete the file from "current" version. But it will be appear in the history anyway.

In other case (when you don't want to loose a history of your changes) - read @Ray's answer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM