1

After a server crash, the appX.git folder on the server is almost all there, object files are intact, but I Lost the appX.git/refs folder and packed-refs file. How do I recreate these references without the client files? On the web interface it shows issues, project members but no files on the repository

1 Answers1

0

Assuming there is no GitLab backup done to restore (through, for instance, gitaly-backup), one possible workaround is to:

  • create a new one with the different name
  • push back a local clone to the new one
  • copy the refs folder of the new one to the old incomplete one on the server

If, however, "without the client files" means there is no local clone anywhere... then there is no obvious solution.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I have the local clones, they are with the team, was trying to fix it before monday. On one repository I got lucky, after trying different objects hashes (directory name + objects names on that dir) I found the last commit, updated the HEAD file and all showed up.. Is the last commit sha1 hash anywhere in the pgsql database? – user17467472 Nov 21 '21 at 21:06
  • @user17467472 pgsql ? A Git repository does not have a pgsql database that I know of. – VonC Nov 21 '21 at 21:18