【问题标题】:git commit error messagegit 提交错误信息
【发布时间】:2012-02-01 10:45:53
【问题描述】:

当我写命令行时:

git commit -m ™Initial commit™

我遇到了一个错误:

error: pathspec '"commit\342\204\242"' did not match any file(s) known to git.

我该如何解决?

【问题讨论】:

    标签: git git-commit


    【解决方案1】:

    可能是那些搞笑的™商标符号:

    $ echo -e "\0342\0204\0242"
    ™
    

    尝试手动输入 git commit -m "initial commit",并使用标准的 " 引号 -- ASCII 八进制 042、十进制 34、十六进制 0x22。

    【讨论】:

      【解决方案2】:

      这似乎是因为没有git可以放入存储库的文件。

      创建一个空文件(例如.gitlock),然后在提交前运行这个命令:

      git add .gitlock
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-09-11
        • 1970-01-01
        • 2015-10-24
        • 2017-01-21
        • 2013-11-12
        • 2012-01-07
        • 2015-10-23
        • 2017-01-18
        相关资源
        最近更新 更多