0

after i commit and push to github, the process declined due to a large file. enter image description here

so, how to unstage this file and remove it to start new commit process.

1 Answers1

0

You have to locally remove the commit containing this large file in order to be able to satisfy the GitHub's file size limit. To do this you can look at your commit history with:

git log

Then copy paste the checksum of the commit preceding the commit containing the large file. If you don't care about the content of the new commits you can just remove them with:

git reset --hard <sha1-of-the-commit-preceding-the-commit-wit-large-file>

or if you want to keep some content:

git reset <sha1-of-the-commit-preceding-the-commit-wit-large-file>

and then git add what you need to make a new commit.

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240