0

I have a git repo that is cloned to my laptop and I accidentally put some files greater than 100MB on it and tried to commit and push. Git gave me an error and so I deleted the files but git still seems to be trying to push them to the remote repo. I can't seem to revert the commit and I definitely don't have the files on disk anymore so I don't know why git is still trying to push them.

  • https://stackoverflow.com/search?q=%5Bgit%5D+remove+large+file+history – phd Feb 27 '20 at 14:27
  • You *do* still have the large files. That's the point of commits: they store *every version* of *every file*. The latest commits say "don't use this file", but earlier commits say "do use this file, and here it is". – torek Feb 27 '20 at 19:27

1 Answers1

0

Couldn't find a solution to this. Ended up deleting the repo and remaking it and copying all the files back in. It's just me on this so it was fine but definitely not a solution if you're working with people.

  • You should look into git `filter-branch` or `git bfg` for next time. As you say it's not a solution for shared repos, but you also lose all your other work of course. – alan ocallaghan Feb 27 '20 at 17:42