-1

I was trying to upload the pdf which was of 286.13 mb and github has limitation of 100mb. When i was trying to upload i got the error saying file size is larger than 100mb. Later i deleted that file and i messed up with repo to solve the error.

later i deleted the file itselfs but not sure how to remove the error

I am getting following error now whenever i am trying to push the changes,

Total 335 (delta 148), reused 48 (delta 32)
remote: Resolving deltas: 100% (148/148), completed with 32 local objects.
remote: error: Trace: 123456789abcedhxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx87
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Selection Guid.pdf is 286.13 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/testtherepo/image.git
 ! [remote rejected] uvr -> uvr (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/testtherepo/image.git'
Tom V
  • 4,827
  • 2
  • 5
  • 22
sagar
  • 1
  • 1

1 Answers1

-1

I would try from these commands and use them to fix git workflow:

git push origin HEAD --force

or

git rebase -i HEAD~N

Here is documentation of the above commands:

and also some examples of using:

Mikolaj
  • 306
  • 1
  • 2
  • 10
  • 2
    The first command will not work: the file is still in the history and it must first be dropped from there with rebase. After that, the new history can be pushed to github (no need to force, as the old history never made it to the repo). – Simon Doppler Mar 08 '22 at 09:56
  • 1
    More details can be found here: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History – Simon Doppler Mar 08 '22 at 09:57
  • Indeed, you are right. Thank you for the link, I will take a look. – Mikolaj Mar 08 '22 at 09:59