Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (29.3k points)

I'm doing:

git clone ssh://[email protected]/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 you that the 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?

1 Answer

0 votes
by (50.2k points)

For this case the solution is, simply add dot next to it:

git clone [email protected]:user/my-project.git .

Even then the error doesn’t resolve to make sure that the directory is empty if you are not sure about your directory then run the above command with: 

rm -rf .* && git clone ssh://[email protected]/home/user/private/repos/project_hub.git .

This will remove the files present in the directory and then it works.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94.2k users

Browse Categories