文档首页> 代码托管 CodeArts Repo> 常见问题> 常见报错解决方法> destination path 'XXX' already exists and is not an empty directory
更新时间:2022-07-08 GMT+08:00
分享

destination path 'XXX' already exists and is not an empty directory

问题现象

从云端克隆代码时,提示“destination path 'XXX' already exists and is not an empty directory”

原因分析

所克隆的代码仓库已存在并且不为空。

处理方法

克隆项目至新目录。
  1. 进入目录:
    cd 本地代码仓库目录
  2. 克隆云端代码仓库到临时目录tmp中:
    git clone --no-checkout 云端代码仓库地址tmp   
  3. 将tmp目录下的 .git 目录移到当前目录:
    mv tmp/.git 本地代码仓库目录名
  4. 删除tmp目录:
    rmdir tmp
  5. 回退至上个版本:
    git reset --hard HEAD
分享:

常见报错解决方法 所有常见问题

more