简体   繁体   English

git commit错误消息

[英]git commit error message

When I write a command line: 当我编写命令行时:

git commit -m ™Initial commit™

I got an error: 我收到一个错误:

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

How can i fix it? 我该如何解决?

It's probably those hilarious ™ trademark symbols: 可能是那些有趣的™商标符号:

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

Try typing in, by hand, git commit -m "initial commit" , and using the standard " quotes -- ASCII octal 042, decimal 34, hex 0x22. 试着输入中,通过手, git commit -m "initial commit" ,并使用标准"报价-八进制ASCII码042,十进制34,十六进制为0x22。

It seems this is because there is no file that git could be put into the repository. 看来这是因为没有文件可以将git放入存储库。

Create an empty file (for example .gitlock), and then run this command before committing: 创建一个空文件(例如.gitlock),然后在提交之前运行以下命令:

git add .gitlock

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM