【问题标题】:How to write full message while commiting with git?如何在使用 git 提交时编写完整的消息?
【发布时间】:2020-09-17 09:09:09
【问题描述】:

这就是我使用 git 提交的方式:

git add -A
git commit -m 'added theme color and image error handling'

但它会为提交消息引发错误:

error: pathspec 'theme' did not match any file(s) known to git
error: pathspec 'color' did not match any file(s) known to git
error: pathspec 'and' did not match any file(s) known to git
error: pathspec 'image' did not match any file(s) known to git
error: pathspec 'error' did not match any file(s) known to git
error: pathspec 'handling'' did not match any file(s) known to git

如何使用 git 编写完整的提交消息?

【问题讨论】:

  • 你在使用git commit调用的任何git钩子吗?
  • 使用不带-m的git commit打开编辑器;如果提交再次失败,如果可能是由于钩子
  • 用双引号试试。

标签: git git-commit


【解决方案1】:

如果您是窗口用户,请使用双引号而不是单引号

git commit -m "initial commit" 代替 git commit -m 'initial commit'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-11-08
    • 2016-07-06
    • 2012-02-08
    • 2016-02-01
    • 2014-03-12
    • 2011-04-25
    • 2013-02-25
    相关资源
    最近更新 更多