Fatal - Destination path already exists and is not an empty directory

This error happens if you attempt to clone a new repository into an existing one. It can happen if a clone attempt was interrupted after the new directory is already created for the repository by git and then you try cloning again on top of it. Delete the target folder and try the clone again if you absolutely must have it in the same location. You may also specify a new directory name to avoid the collision:

time git clone --depth 1 https://chipcode.qti.qualcomm.com/home/git/mycompanyname_msm8974-la-2-0-1_adsp_eco_hap.git MyRepo

The above will create the repository in a folder named MyRepo

time git clone —depth 1
[https://chipcode.qti.qualcomm.com/home/git/mycompanyname_msm8974-la-2-0-1_adsp_eco_hap.git](https://chipcode.qti.qualcomm.com/home/git/mycompanyname_msm8974-la-2-0-1_adsp_eco_hap.git)

The above will create the repository in a folder named mycompanyname_msm8974-la-2-0-1_adsp_eco_hap

If the git clone operation is interrupted for any reason before the first checkout is completed, then the directory should be considered corrupt and should be deleted. Only after the clone is completed and checkout successful can subsequent git pull commands succeed within that directory.

If the directory exists and is already a cloned repository, then trying to clone the same repository again on top of an established repository is unnecessary. Instead, you should change to the directory and execute the git pull command to update it.