git clone时出现"fatal: destination path 'spiders' already exists and is not an empty directory."的解决办法

今天在windows使用 git clone 代码时,遇到了如下错误

fatal: destination path 'spiders' already exists and is not an empty directory.

按照我的理解就是目标路径已经存在并且不是个空目录,但是吧,我在文件夹下并没有看到任何文件,然后我就百度了一番,果然,在这个文件夹下是有隐藏文件的

然后我打开 工具 -> 文件夹选项 -> 查看 -> 显示隐藏文件,发现了隐藏的文件夹 ".git" 文件夹。

删掉该文件夹后,再次执行git clone,成功拉下代码。

Cloning into 'spiders'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.

猜你喜欢

转载自blog.csdn.net/qq_39377418/article/details/89301172
今日推荐