【问题标题】:Git clone without parent directory fails in Nitrous.io没有父目录的 Git 克隆在 Nitrous.io 中失败
【发布时间】:2014-08-02 05:03:38
【问题描述】:

fatal: destination path '.' already exists and is not an empty directory. 是在我的 Nitrous.io 框中对git clone my-repo . 的回复。我已经删除了所有内容并从根目录运行它。另外,运行ls 什么也没给我,所以它是一个空目录。

是我遗漏了什么还是 Nitrous.io 的设置本身存在问题?

【问题讨论】:

    标签: git github directory fatal-error nitrousio


    【解决方案1】:

    从根目录运行

    那么,您必须使用git clone url .,因为. 指的是现有文件夹(此处为您的根目录)。

    用途:

    git clone /url/to/my/repo: will create a 'repo' subfolder
    # or
    git clone /url/to/my/repo asubfolder: will create a 'subfolder'
    

    【讨论】:

    • 是否可以将 repo 的内容克隆到根目录而不将内容放在子文件夹中?例如:git clone url(repo 只有一个 index.php 文件),ls 现在返回 index.php,我们在根目录中
    • @tejas-manohar 我不知道,即使是子树也使用子文件夹:stackoverflow.com/a/24709789/6309 (blogs.atlassian.com/2013/05/…)。
    猜你喜欢
    • 1970-01-01
    • 2019-05-10
    • 2011-06-11
    • 1970-01-01
    • 2016-12-12
    • 2021-04-11
    • 2014-09-03
    • 2023-04-09
    相关资源
    最近更新 更多