0

I'd like to push a local branch to remote. This local branch contains work that was not done by me and includes some LFS object reference in history. My git push attempted failed because of LFS upload missing objects.

git lfs ls-files

35967a21e5 - spec/fixtures/git-cheat-sheet.pdf

I also couldn't lfs push:

git lfs push origin mybranch                    
LFS upload missing objects: (0/1), 0 B | 0 B/s                                                                                                                                                                
  (missing) spec/fixtures/git-cheat-sheet.pdf (35967a21e5d856eaea89d2e5dd55a5e3b5f4e1e4efe3b000ef6d60b31600f1d2)
Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done.

Running git lfs untrack or remove git cache doesn't untrack this PDF. Is there any way I can push my branch? I wouldn't care if this file is stored in LFS or not

user2309838
  • 197
  • 6
  • 13

1 Answers1

1

Turns out this PDF file was stored in GitLab server (where the branch is from), and I need to git lfs pull in order to get the actual file (otherwise would just be a LFS pointer on my locally cloned repo). Then, I can git lfs push or git push like normal

user2309838
  • 197
  • 6
  • 13