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

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.