删除Git Hub相关文件

我正在学习Git Hub。所以我是新手。 尝试删除项目目录中的git相关文件。我用了这一行:

rd .git /S/Q

但是当我使用VS Code时,它给了我这个错误:

  

Remove-Item:找不到接受参数'/ q'的位置参数。   在第1行:char:1   + rd / s / q .git   + ~~~~~~~~~~~~~~       + CategoryInfo:InvalidArgument:(:) [Remove-Item],ParameterBindingException       + FullyQualifiedErrorId:PositionalParameterNotFound,microsoft.PowerShell.Commands.RemoveItemCommand

当我使用CMD时-命令promt会给我这个错误:

.git\refs\remotes - The directory is not empty.

发生了什么事。 这是我获得有关此信息的地方: From stackoverflow From YouTube

我正在使用Windows 10 btw。

编辑: 我尝试过:

rd /S /Q .git

我收到错误消息:

  

Remove-Item:找不到接受参数'/ Q'的位置参数。   在第1行:char:1   + rd / S / Q .git   + ~~~~~~~~~~~~~~       + CategoryInfo:InvalidArgument:(:) [Remove-Item],ParameterBindingException

尝试:

rd /S/Q .git

错误:

  

Remove-Item:找不到接受参数'.git'的位置参数。   在第1行:char:1   + rd / S / Q .git   + ~~~~~~~~~~~~~       + CategoryInfo:InvalidArgument:(:) [Remove-Item],ParameterBindingException

但是我在命令提示符中尝试过

rd /S /Q .git

然后我得到:

.git\refs\remotes - The directory is not empty.

此后,我第二次尝试,它可以工作... 那我在这里想念什么?

编辑2:

所有这些命令都可以在命令提示符下工作,但前提是我必须第二次键入它们。包括命令-rd .git / S / Q。 我第一次得到:

.git\refs\remotes - The directory is not empty.

,如果我第二次键入它,它将起作用。 在VS Code中,无论我键入多少次,都无法正常工作。

liuchang1777 回答:删除Git Hub相关文件

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2864877.html

大家都在问