I’m doing:

git clone ssh://user@host.com/home/user/private/repos/project_hub.git ./

I’m getting:

Fatal: destination path ‘.’ already exists and is not an empty
directory.

I know path . already exists.
And I can assure that directory IS empty. (I do ls inside and I see nothing!)

What am I missing here in order to clone that project into the current directory ?

22 s
22

simply put a dot next to it

git clone git@github.com:user/my-project.git .

From git help clone:

Cloning into an existing directory is only allowed if the directory is empty.

So make sure the directory is empty (check with ls -a), otherwise the command will fail.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *