【问题标题】:Can't clone git repo on windows when some file names contain asterisk当某些文件名包含星号时,无法在 Windows 上克隆 git repo
【发布时间】:2014-11-06 21:08:33
【问题描述】:

我的存储库中有以下名称的文件:

*.example.com.crt

问题是我无法在 windows 上克隆存储库。

error: unable to create file *.example.com.crt (Invalid argument) Checking out files: 100% (6122/6122), done. fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed.

您知道任何解决方法吗?

【问题讨论】:

    标签: windows git


    【解决方案1】:

    很遗憾,没有。 Windows disallows certain characters in the filename,Git 几乎可以支持任何东西,所以由你来管理它。我认为您最好的解决方案是简单地重命名文件。

    我个人会避免在文件名中使用*,因为它是一个全局字符。

    【讨论】:

    • 当文件在 wiki repo 中时,这是一个特殊的问题。无法从 repo 网页重命名文件,也无法从 git bash 重命名它,因为您无法检查 wiki。 - 在这种情况下,我看到的唯一解决方案是在 linux 机器上签出以重命名文件。我希望有人对此有另一种解决方案。
    猜你喜欢
    • 2010-11-05
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-14
    • 1970-01-01
    相关资源
    最近更新 更多