Force push a git lfs file ID

I managed to trigger some extra documentation somehow.... the syntax is actually

git lfs push origin --object-id [ID]

And it will force sync an object that a simple git lfs push would not


I had errors on my build system after migrating a repository and it's pipeline to a new remote. I deleted the repository on the old remote before migrating the LFS data (which I forgot existed). When the pipeline ran, I was seeing errors such as

fetch: Fetching reference f0e482d67ea35e173e15a22c0bacb37f2c059365
[b898bde8bb8ee3ee58390ec930e8608568920f61cc9954f198bdacdf79e0d7a8] LFS object not found: [404] LFS object not found
[112e9f3c1dba98d5cafcaadbf2a34dda733a4175632c0d4ba3dbfc590d95ffd4] LFS object not found: [404] LFS object not found
[dd8066b545c4fb09057ace1cf6c6fb8df41b89647c33b5f071d38255da7539ed] LFS object not found: [404] LFS object not found
error: failed to fetch some objects from '<redacted>.git/info/lfs'
##[warning]Git lfs fetch failed with exit code 2, back off 5.225 seconds before retry.

Fortunately, I had the LFS data locally and was able to resolve via:

git remote rm origin
git remote add origin <new_remote_url>
git lfs push origin --all

Tags:

Git

Git Lfs