首先,不要尝试在Desktop中创建Git存储库:这不是存储项目源的好地方。
其次,检查你是否 使用PowerShell和mount驱动器 。 或者检查一下你是否 使用SourceTree 。
请尝试使用常规CMD,并且 git init myrepo :这将创建一个myrepo文件夹(带有 .git 在里面)
git init myrepo
.git
一定要使用 最新的Git for Windows 2.21 。