I backed up a git project, and got “fatal: Not a Git Repository”

后端 未结 2 1887
無奈伤痛
無奈伤痛 2021-01-21 20:17

I backed up a git folder from Linux onto a FAT32 external drive, and copied it back later, and it said

fatal: Not a git repository (or any of the parent director         


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-21 20:29

    How to break your git repository suggests trying either

    find . -type f -print0 | xargs -0 chmod a-x
    

    or renaming head to HEAD.

    The latter fixed it for me.

提交回复
热议问题