Git error fatal: unable to stat '*': No such file or directory

前端 未结 6 1428
清歌不尽
清歌不尽 2020-12-15 03:25

I ran into this error, and found very little documentation on how to fix it online. I got the error by trying to run the command git add ., and received this re

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-15 03:52

    Another cause for this problem on Windows might be reserved file names. I bumped on them when I tried to clone the Linux Kernel repository out of curiosity on my Windows 10 machine, and Git could not create aux.c and aux.h files.

    So you cannot create any file (with any extension) or folder named: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, case insensitive.

    See: https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#naming-conventions

提交回复
热议问题