Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
251 views
in Technique[技术] by (71.8m points)

Why 'git push origin master' is pushing old files to GitHub?

I am creating a GitHub pages, I already deploy the react app to GitHub pages with custom domain.

Earlier there is a file over 100MB, but when I came to know that GitHub allows only 100MB, I replaced that file with a 29MB file.

When I am pushing the new changes to GitHub master branch using "git push origin master" I am getting an error see the attached image

Click to see the Error Image

question from:https://stackoverflow.com/questions/66058521/why-git-push-origin-master-is-pushing-old-files-to-github

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The old large file is likely still part of your local Git history and as you know, the whole history of the branch is pushed.

You'll need to make sure it isn't in an earlier commit either, eg by reset ing back to a commit where the video isn't there, then committing only the new smaller one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...