【问题标题】:`git` - could not able to create `achive` existing repo`git` - 无法创建 `achive` 现有 repo
【发布时间】:2017-10-30 10:53:43
【问题描述】:

我正在尝试使用以下命令导出我现有的git repo。但我最终遇到了错误。有人帮我解决这个问题吗?

我的命令:

PS F:\Nissan-Gulp> git archive --format zip --output F:\convert master
fatal: could not create archive file 'F:\convert': Is a directory
PS F:\Nissan-Gulp>

我现有的git 项目位于Nissan-Gulp,我希望发送到'F:\convert': 文件夹。但不起作用。

【问题讨论】:

    标签: git git-archive


    【解决方案1】:

    F:\convert 路径应该是文件,而不是目录。创建该目录并使用F:\convert\FILENAME 运行命令,将FILENAME 替换为您希望为存档命名的名称。

    【讨论】:

    • 我试过了,但仍然不是为我创建的文件。我喜欢:` git archive --format zip --output F:\convert\new` - new 是我希望在F - 文件夹中创建的文件名。
    • 即使创建了文件,文件大小仍然是0KB - 如何解决这个问题?
    • 最后我尝试了 ` git archive --format zip --output F:\new master ` - 它工作正常。谢谢!!
    猜你喜欢
    • 2022-06-14
    • 1970-01-01
    • 2019-05-25
    • 1970-01-01
    • 1970-01-01
    • 2021-11-16
    • 2017-12-25
    • 2023-01-18
    相关资源
    最近更新 更多