Im not sure why but something is a little screwed up on my repo and when I try to push my branch to github I get an error:
> git push
Git LFS: (0 of 1 files) 0 B / 61.99 MB
LFS upload failed:
(missing) path/to/bigfile (50...4b)
error: failed to push some refs to '[email protected]:me/myproject'
> git-lfs ls-files
50.. - path/to/bigfile
> git-lfs fsck
Object path/to/bigfile (50...4b) could not be checked: no such file or directory
Object path/to/bigfile (50...4b) could not be checked: no such file or directory
Moving corrupt objects to /Users/myname/.../.git/lfs/bad
rename /Users/myname/.../.git/lfs/objects/50/b6/50...4b
/Users/myname/.../.git/lfs/bad/50...4b: no such file or directory
Note that I don't care removing or deleting this file, it is not used anymore. (but the file is there!)
I have tried to git-lfs untrack path/to/bigfile but no luck, and I can't push my branch.
How to fix this?
git rebase -iorgit filter-branch) would be the right approach. The commit that uses the missing file has, apparently, not been sent upstream yet: if it had been you would't see failure here. So rewriting history to modify or discard the commit with the missing file, and any further commits that depend upon that commit, would get past that problem. But, again, I don't use git-lfs.