Git Missing Commit error

前端 未结 2 553
刺人心
刺人心 2021-01-13 06:13

We recently changed the location of a repository, and we discovered a months-old commit is missing from the files. The old server we had the Git on is down, so there is no c

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-13 06:46

    Every clone has full history so anyone who worked on that project since the commit was published should have it on their computer. Look inside anyone's working directory for the commit then add it's packs and objects (content of the .git/objects directory) to the broken repository (only files that don't exist), fsck again and repack.

    It's not possible to reconstruct the object if you don't find it anywhere.

提交回复
热议问题