Help Center> CodeArts Repo> FAQs> Troubleshooting> Message "destination path 'XXX' already exists and is not an empty directory" Is Displayed
Updated on 2023-12-04 GMT+08:00

Message "destination path 'XXX' already exists and is not an empty directory" Is Displayed

Symptom

The message destination path'XXX' already exists and is not empty directory is displayed during code clone from a cloud repository.

Analysis

The repository directory already exists and is not empty.

Solution

Clone the project to a new directory.
  1. Enter the directory:
    cd local repository directory
  2. Clone the cloud repository to the tmp directory.
    git clone --no-checkout repository URL tmp
  3. Move the .git directory from the tmp directory to the current directory.
    mv tmp/.git name of the local repository directory
  4. Delete the tmp directory.
    rmdir tmp
  5. Roll back to the earlier version.
    git reset --hard HEAD

Troubleshooting FAQs

more