1

I have a Git repository which contains a large number of binary files that change on a regular basis.

Now I want to migrate the whole repository (including history) Git LFS and succeeded using git lfs migrate import --everything.

Is there a method to retain the original SHA1-hashes of the commits before the migration, so that I can still search for them in case I need to reproduce old results?

I am aware, that the commit hashes themselves depend on the whole history and will change. I am talking about e.g. bulk editing the commit messages such that they contain the original hash.

Tim
  • 1,430
  • 15
  • 36
  • 1
    Yes, I believe the message callback of`filter-repo` will allow you to do that. See https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html#CALLBACKS Note that this will itself change the ID of every commit. – matt May 02 '22 at 13:23
  • @matt Thank you. I will give it a try. I do not care about the ID being changed. `git lfs migrate` will replace the temporary ID anyway. – Tim May 02 '22 at 13:30

0 Answers0