fatal: destination path ‘文件夹名’ git clone already exists and is not an empty directory解决方法

转自https://blog.csdn.net/android_cmos/article/details/72901395 感谢博主!

git问题及解决方法

今天在使用git的时候出现了这个错误,我是先在oschina创建了git仓库地址,然后使用git clone https://github.com/kdk007/xxxx.git 操作时,出现的

fatal: destination path ‘文件夹名’ git clone already exists and is not an empty directory

在这里插入图片描述

解决方法如下:

1.git init
2.git remote add origin https://[email protected]
3.git fetch
4.git branch master origin/master
5.git checkout master

然后你就可以用

git add . 
git commit -m “提交信息” 
git push origin master 

对你的代码进行提交上传了。


猜你喜欢

转载自blog.csdn.net/weixin_40688217/article/details/90814983