0

Earlier today I made a commit and a push to my repo. My commit included a large file (quantifications.csv) which gave me the typical error that it couldn't be pushed and that I should use git-lfs. I tried to remove the file from my history using

git rm --cached /path/to/quantifications.csv

The rm worked fine, but when I try to push, I still get the lfs notification. I have tried multiple things by this point, but I still can't seem to push my work.

user1165927
  • 41
  • 1
  • 3
  • 1
    You'll need to remove it from any previous commits too, just because the file isn't in the latest commit doesn't mean it is eradicated from the history (and still carries with it the size) -- you'll want to look into how to `rebase` – anthony sottile Jul 12 '17 at 02:44

1 Answers1

0

Thanks to Anthony Sottile. I didn't figure out the rebase option before I went for the nuclear option. I used BFG to make a git copy of the repo, remove the file from history, pushed and then cloned the repo again. Unfortunately, this had the side effect of somehow deleting a large fraction of my repo history up to the last commit before the generation of the offending file.

user1165927
  • 41
  • 1
  • 3