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

git问题及解决方法

今天在使用git的时候出现了这个错误,我是先在oschina建立了git仓库地址,而后使用git clone https://xxxx@xx.git 操做时,出现的git

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

解决方法以下:web

  1. git init
  2. git remote add origin https://xxx@xx.git
  3. git fetch
  4. git branch master origin/master
  5. git checkout master

而后你就能够用
git add .
git commit -m “提交信息”
git push origin master
对你的代码进行提交上传了。



若是本文对你有帮助,点个赞呗,若是没有帮助,还请指出。 =.=svg