$ git clone ssh://host/repo.git ~/
destination directory '/home/username/' already exists.
有人能告诉我如何使这个工作?我想快速地复制常见的开发脚本和配置。
$ git clone ssh://host/repo.git ~/
destination directory '/home/username/' already exists.
有人能告诉我如何使这个工作?我想快速地复制常见的开发脚本和配置。
这似乎有效:
cd ~
git init
git remote add origin ssh://host/repo.git
git pull origin master
$ git clone ssh://host/repo.git ~/your_directory
clone
命令会创建一个名为 ~/your_directory
的目录。如果该目录已经存在,则会返回相应的错误信息。
cd ~ && git clone ssh://host/repo.git
命令。 - ouahcd ~
git clone ssh://host/repo.git
接下来,您的项目位于/home/username/repo/
目录中。
如果您希望将项目放置在不同的文件夹名称下(例如'foo /')
mkdir ~/foo
cd ~/foo
git clone ssh://host/repo.git foo/
我会将存储库克隆到子目录中:
git clone ssh://your/git/repo.git ~/repo
并创建符号链接到配置文件:
ln -s ~/repo/.bashrc ~/.bashrc
git clone
会在工作路径下创建一个新目录,或者在指定的路径下创建。由于~/
已经存在,它无法创建一个新的目录... - Karl Barker