title: GitLab and LFS Pushing with Missing Files
body: <p>I have a very old repository I have been using and at some point some LFS files have gone missing. Quite a few of them. When I try and push to a new repository in Gitlab, I get the following error</p>
  <pre><code> GitLab: LFS objects are missing. Ensure LFS is properly set up or try a manual 
  </code></pre>
  <p>Other QA for git-lfs (<a href="https://github.com/git-lfs/git-lfs/issues/2744" rel="nofollow noreferrer">here</a>, <a href="https://stackoverflow.com/questions/47379344/gitlab-push-error-lfs-objects-are-missing">here</a>) indicate that usually some variant of <code>git lfs push --all</code> but I don't have a working repo with these files anymore and they are gone for good. Gitlab ignores pushing with --no-verify and still gives the error.</p>
  <p>Running <code>git lfs fetch  --all</code> gives a lengthy list of missing OID</p>
  <pre><code>[43cb9e6d1d15bb8d31af911aa69a15a67174c5df73dabc85294ce08198cac468] Object does not exist on the server or you don't have permissions to access it: [404] Object does not exist on the server or you don't have permissions to access it
  [454907d530534af9cc95903820c0a632a851b45de98ba18e1de117b8a649f8ac] Object does not exist on the server or you don't have permissions to access it: [404] Object does not exist on the server or you don't have permissions to access it
  [ce1314f0c4cb05f349540fa144d33faeb2281ae552cf75dc866a8350d90fd2ac] Object does not exist on the server or you don't have permissions to access it: [404] Object does not exist on the server or you don't have permissions to access it
  [d5e8925d273cb00341f00d0f40b39f97cced1e833ef687de2d4663836e7f4e45] Object does not exist on the server or you don't have permissions to access it: [404] Object does not exist on the server or you don't have permissions to access it
  ...
  </code></pre>
  <p>Another post <a href="https://bryanbrattlof.com/removing-git-lfs-from-a-project/" rel="nofollow noreferrer">here</a> contains scripts to remove LFS entirely by checking out every commit and smudging LFS files, but this seems highly detrimental to the repository moving forward. Still another indicates a path to remove the LFS file entirely (<a href="https://community.atlassian.com/t5/Bitbucket-questions/Delete-Git-LFS-files/qaq-p/863172" rel="nofollow noreferrer">here</a>).</p>
  <p>All these issues seem to be suboptimal:</p>
  <ol>
  <li>Removing LFS will grossly bloat the repo and the smudge is likely to fail for the files already broken, anyway</li>
  <li>Git pull/push -all is not an option because the files are gone for good</li>
  <li>Removing the LFS is not right because a version of the files exist today only the object in some branch in the past is missing, so all  instructions on how to remove LFS will break the repo.</li>
  </ol>
  <p>Is there a way to have GitLab not ignore no-verify or to efficiently filter out specific OID from the history? I don't mind if the files are missing forever but I had hoped to preserve history.</p>
  <p>I know that I can run <code>git log --all -p -S 43cb9e6d1d15bb8d31af911aa69a15a67174c5df73dabc85294ce08198cac468</code> to get the commit and file (though it takes 5-10min to run PER OID, so this would take many hours), but I don't know what to do with that.</p>