我正在尝试使用 git clone
从我的 webfaction 服务器下载代码
$ cd ../webapps/nameofwebapp/
$ git clone git@github.com:github-username/github-repo.git ./
并且有错误:
fatal: destination path '.' already exists and is not an empty directory.
我用ls,nameofwebapp
下有东西
auth git.cgi gitweb.cgi repos static
想问一下哪里可以用git clone
我需要创建一个新目录吗??
最佳答案
简单地:
git clone git@github.com:github-username/github-repo.git
这将在 ../webapps/nameofwebapp/
中创建一个新文件夹 github-repo
。
在你的情况下:
cd ../webapps/nameofwebapp/
git clone git@github.com:github-username/github-repo.git -b develop ./
如果您已经进行了克隆:
cd github-repo
git checkout -b develop origin/develop
关于git - 为什么我在尝试从我的 webfaction 服务器克隆时收到 "destination path ' .' already exists"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25591486/