我的机器上有两个文件夹放在一起。
/Documents/Learning/Project1/Documents/Learning/Test for gitProject1内部有一个本地存储库,其中有一个提交,我想将它复制到另一个文件夹。我在运行命令:
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1 .
fatal: repository '/Documents/Learning/Project1' does not exist
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1.git .
fatal: repository '/Documents/Learning/Project1' does not exist
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1.git .
fatal: repository '/Documents/Learning/Project1' does not exist
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1/.git .
fatal: repository '/Documents/Learning/Project1' does not exist
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1 .
fatal: repository '/Documents/Learning/Project1' does not exist
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1 .
fatal: repository '/Documents/Learning/Project1' does not exist
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1.git .
fatal: repository '/Documents/Learning/Project1' does not exist
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1/git .
fatal: repository '/Documents/Learning/Project1' does not exist
/Documents/Learning/Test for git$ git clone /Documents/Learning/Project1/.git .
fatal: repository '/Documents/Learning/Project1' does not exist但是我一直收到一个错误:存储库不存在,我遗漏了什么?
发布于 2019-09-01 20:18:12
您的存储库不在/Documents/Learning/Project1中。在/home//Documents/Learning/Project1里。您还可以使用快捷方式~/Documents/Learning/Project1。
请注意,不能将克隆复制到现有的(非空的)目录中,所以应该删除~/Documents/Learning/Test for git,命令应该是(assuming <#>assuming当前的工作目录是 ~/Documents/Learning/):
$ git clone ~/Documents/Learning/Project1/ ./Test\ for\ git/https://askubuntu.com/questions/1170084
复制相似问题