Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
199 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...