0

I am trying to resolve a bad merge that was made to our master branch in GitHub. We use Git LFS to store large files. My expected result is to get my working directory back to how it was at a certain commit, large files and all. Master is missing LFS file "storm_ability" which exists in commit 4abc5d6.

How can I revert so that we have that file again?

I have tried: git revert 4abc5d6

But all I get is an error due to conflict:

error: could not revert 4cb86db... Encountered 1 file(s) that should have been pointers, but weren't: "some_other_lfs_file"

I add that bad file to resolve but there are no other files from that commit, for example, "storm_ability"...? How do I get them all back?

Thank you

Pankwood
  • 1,799
  • 5
  • 24
  • 43
  • Did you try to simply checkout the missing file from the previous commit without reverting? – plalx Dec 13 '19 at 16:21
  • did a `git lfs checkout "storm_ability"` it ran with no output. no file in local directory. `git checkout "storm_ability"` returns error: no file known to git. – Austin Lelonek Dec 13 '19 at 16:36
  • Perhaps https://stackoverflow.com/questions/54367756/get-old-revision-of-a-git-lfs-file could help? – plalx Dec 13 '19 at 20:16
  • That does seem to work for getting an older version of one file. More manual than a one stop revert command that would take care of non LFS files too. Fixes my problem short term, but doesn't quite answer the question. – Austin Lelonek Dec 15 '19 at 17:01

0 Answers0