0

I recently pushed a ~130 Mb file to my Github repo using LFS. I then realized this was a bad idea and removed it.

The problem is that it is still there tacking up space in my history and my quota:

enter image description here

According to the answers given here How to delete a file tracked by git-lfs and release the storage quota? and Github's own docs the only solution to remove this file is to delete and recreate the repo. This is of course insane.

So my question: can I simply remove the large file stored inside the /.git/lfs folder? The full path looks like this:

/path_to_my_repo/.git/lfs/objects/f4/f0/f4f05bce7c2660dcb85c4eaf709bc2d161eb758b3ccd54ffa474f49f0e4bd684

Will this destroy my repo or is it safe?

Gabriel
  • 40,504
  • 73
  • 230
  • 404
  • This will still not delete it on the server, only on your local machine. – fredrik Aug 15 '23 at 20:45
  • If github does not allow you to list and manipulate individual files in the LFS storage, like some others hosters at least has done before, then you're stuck with what their official docs say. – fredrik Aug 15 '23 at 20:48

0 Answers0