2

I did the following on my repository and now all the files have been replaced by statements like these(I have replaced the value in the second line with *s):

version https://git-lfs.github.com/spec/v1
oid sha256:8*****************************************93
size 1003203

lfs commands run:

git lfs install
git lfs track "*.xyz"
git lfs migrate import

Now all files including the xyz files are unreadable. How can I possibly undo these ?

fireball.1
  • 1,413
  • 2
  • 17
  • 42

2 Answers2

5

import changes all the files to their SHA keys. Running the following helped my case:

git lfs migrate export --include "*" 

I used --include "*" here since I had run migrate export without an include flag and all the files were added to .gitattributes. In case of exclusive files being unreadable, do the following:

git lfs migrate export --include "filepath/filename" 
fireball.1
  • 1,413
  • 2
  • 17
  • 42
0

This worked for me:

git lfs checkout

followed by

git lfs fetch

Solution from Retrieve original files after a git clone with git lfs

Princewill
  • 13
  • 3