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
- Enter the directory:
cd local repository directory
- Clone the cloud repository to the tmp directory.
git clone --no-checkout repository URL tmp
- Move the .git directory from the tmp directory to the current directory.
mv tmp/.git name of the local repository directory
- Delete the tmp directory.
rmdir tmp
- Roll back to the earlier version.
git reset --hard HEAD
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.