0

I had committed a large file (15Mb) locally. It fails when I do "git push" because a remote server blocks it. So I've tried many times to remove it but keep getting this error:

error: remote unpack failed: error The blob object aa6526b297e0c54b8a7e865e441fb7e4f6122c1f was rejected: The object is 15668057 bytes, which is greater than the 10485760 byte limit for objects in this repository.

I did a "git log" to find the commit (it was two commits ago), and then:

git reset --hard 1b8c876a9ca8eab6569876e9b16086ca75690c0e

git rm [file name]

git add .

git commit -m "removing large file"

And when I do git push again, I get the same error. So I can't push to the remote.

How do I resolve this??

Chuck
  • 1,061
  • 1
  • 20
  • 45
  • [Here's how to ask a proper "Where's the bug / Fix my code" question](https://meta.stackoverflow.com/a/253788/11107541). I know your question is not about code, but much of the same guidance still applies. You can also read [ask] for further guidance. Please write a descriptive, non-ambiguous title. For more guidance, see [How do I write a good title?](https://meta.stackexchange.com/q/10647/997587) – starball Jan 05 '23 at 22:20
  • https://stackoverflow.com/search?q=%5Bgit%5D+remove+large+file+history – phd Jan 05 '23 at 22:27

0 Answers0