I have a Git repository with LFS. Initially, I committed up to commit A
, then deleted the repo. Later, I downloaded it from GitHub and continued committing up to commit B
. Now, I don’t have access to the original repo and want to migrate from LFS to a regular repo locally and push that as new.
The issue is that I don’t have the LFS data for commits before A, and running git lfs migrate export --everything
results in an error due to this missing data. I believe it might be possible to use a shell script with git filter-branch
to migrate from LFS, replacing the missing files with their versions from later commits, or removing them if they can’t be found. Any advice on how to accomplish this?
Yuriy Danyliuk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.