Common causes
- You already cloned the repo and are trying to clone it again
- A directory with the same name as the repo exists in the current folder
- A previous interrupted clone left a partial directory behind
- You're running the clone command from inside the project directory
How to fix it
- cd into the existing directory instead of cloning again: cd <repo-name>
- Delete the existing directory if it's safe to do so: rm -rf <repo-name>, then clone
- Clone into a different directory name: git clone <url> <new-name>
- If it was a partial clone, remove it and retry: rm -rf <repo-name> && git clone <url>
Example
fatal: destination path 'my-project' already exists and is not an empty directory.Running git clone when you've already cloned the repository into the same directory
Have a different error?
Paste any error message into the Error Translator to get an instant explanation.
