0

fatal: destination path '.' already exists and is not an empty directory. is the response to git clone my-repo . in my Nitrous.io box. I've deleted everything and running this from the root directory. Also, running ls gives me nothing so it is an empty directory.

Am I missing something or is this an issue with how Nitrous.io is setup itself?

screenshot of my empty dir

Tejas Manohar
  • 954
  • 2
  • 11
  • 28

1 Answers1

1

running this from the root directory

Then, you must not use git clone url ., because . refers to an existing folder (here, your root directory).

Use:

git clone /url/to/my/repo: will create a 'repo' subfolder
# or
git clone /url/to/my/repo asubfolder: will create a 'subfolder'
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • is it possible to clone a repo's contents into root directory without putting the contents in a subfolder? ex: git clone url (repo has just an index.php file), ls now returns index.php, we're in root dir – Tejas Manohar Aug 02 '14 at 12:10
  • 1
    @tejas-manohar not that I know of, even a subtree uses a subfolder: http://stackoverflow.com/a/24709789/6309 (http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/). – VonC Aug 02 '14 at 12:22