gpt4 book ai didi

Git commit -m 不接受消息中的空格

转载 作者:行者123 更新时间:2023-12-05 02:23:18 27 4
gpt4 key购买 nike

<分区>

我对 Linux 比较陌生,所以这可能很简单,但是当我在我的 git 提交消息周围使用引号(单引号或双引号)时,这些词被当作文件名。如何在消息中使用带空格的 -m - 我不想使用 vi。

user@linux:~/Documents/tmp$ git status

On branch master

Initial commit

Changes to be committed:
(use "git rm --cached <file>..." to unstage)

new file: afile

user@linux:~/Documents/tmp$ git commit -m ¨this message has spaces and fails¨

error: pathspec 'message' did not match any file(s) known to git.

error: pathspec 'has' did not match any file(s) known to git.

error: pathspec 'spaces' did not match any file(s) known to git.

error: pathspec 'and' did not match any file(s) known to git.

error: pathspec 'fails¨' did not match any file(s) known to git.

user@linux:~/Documents/tmp$ git commit -m ¨nospacesisokay¨

[master (root-commit) 37afcd6] ¨nospacesisokay¨

1 file changed, 1 insertion(+)

create mode 100644 afile

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com