gitwebfaction

Why am I getting a "destination path '.' already exists" error when trying clone from my webfaction server?


I'm trying to use git clone to download the codes from my webfaction server

$ cd ../webapps/nameofwebapp/
$ git clone git@github.com:github-username/github-repo.git ./

AND there is error :

fatal: destination path '.' already exists and is not an empty directory.

I use ls and there are something under the nameofwebapp

auth  git.cgi  gitweb.cgi  repos  static

I want to ask where to use git clone Do I need to make a new directory??


Solution

  • Simply:

    git clone git@github.com:github-username/github-repo.git
    

    That will create a new folder github-repo in ../webapps/nameofwebapp/.

    In your case:

    cd ../webapps/nameofwebapp/
    git clone git@github.com:github-username/github-repo.git -b develop ./
    

    If you already did the clone:

    cd github-repo
    git checkout -b develop origin/develop