0

I'm really not a Git user other than GitHub using the Windows Client. I've recently been working with a client that uses Git and Springloops.

The problem is that I added a large file to my local working copy and committed that to my local master branch. After a few other local commits I'm not trying to push this to Springloops and it's failing with the following error:

error: unpack failed: error Object too large (109,896,858 bytes), rejecting the pack. Max object size limit is 104,857,600 bytes.

How do I reach back into this older commit and remove this file in order to push to Spingloops?

I've got Git installed (obviously) and also TortoiseGit. I've managed to find this file stuck in an old commit using the GitGUI but cannot for the life of me figure out what to do.

Since I subsequent local commit removed this file I can only assume that it's trying to commit this to the remote repository before then removing it again.

Very confused and very lost on this one.

Jammer
  • 9,969
  • 11
  • 68
  • 115
  • 1
    You should check [this](http://stackoverflow.com/questions/12481639/remove-files-from-git-commit) out in order to solve your problem. – pavjel Oct 13 '15 at 11:07
  • It's not my last commit though, it's a four commits old as I deferred dealing with this due to deadlines. – Jammer Oct 13 '15 at 11:11
  • Look up how to rewrite your history with Git from the command line. A simple interactive rebase (perhaps with preserving merge commits if you have them) could probably solve this issue for you very easily. There are plenty of resources on Stack Overflow about rewriting history with rebase already. –  Oct 13 '15 at 11:30
  • I knew I must have written up [a detailed list of options for this situation](http://stackoverflow.com/a/23188613/456814) somewhere...yeah, try one of the `rebase` options. –  Oct 13 '15 at 11:37
  • If you're not comfortable using the command line to use Git, and want to use your Git GUI client instead, update your question with that detail, and I'll reopen it for you. –  Oct 13 '15 at 11:42
  • I've got to move on to other work but will go read your options write up. Coming from SVN Git feels incredibly complicated in comparison and I don't like learning it on a live repository. – Jammer Oct 13 '15 at 11:57
  • @Jammer that's ok, I came from an SVN background first too. Spending my commutes on the subway train to and from work reading [Pro Git](https://git-scm.com/book/en/v2) helped me a lot. Just remember that you always have the option of just making another local clone of a Git repo to play around (and break stuff) with, assuming you have space on your disk drive for a second copy. –  Oct 13 '15 at 12:13
  • @Cupcake many thanks for that link. The issue is I don't have a compelling reason to really dig into it to that depth yet as I just completed a 3 week stint on a project using Git whilst I'm still solely SVN oriented. Thanks again for your time, much appreciated. – Jammer Oct 13 '15 at 13:56

0 Answers0