克隆存储库时如何避免创建子文件夹

时间:2020-05-26 10:58:45

标签: git

gilab上的项目包含在支出文件夹中。 我正在本地创建一个空文件夹并运行git init。 然后执行命令git clone <repo adress> .,并在其末尾加一个点并得到

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

如果我在末尾删除点,则存储库将上传到子文件夹。

spend
    .git
    spend
        repo_file and folder

如何在不创建额外文件夹的情况下执行此操作?

1 个答案:

答案 0 :(得分:1)

由于该项目已经存在,并且您正在git clone那里得到它,因此不需要上一步git init

因此,转到您要在其中放置项目文件夹的目录,然后执行简单的git clone