我正在学习 Udacity 类(class),输入以下内容后:
g cmp "adds string.replace() quiz"
我收到了错误信息
git:3: command not found: quiz
git:80: command not found: quiz
git:84: command not found: quiz
现在我输入的任何 git 命令都会返回
git:1: command not found: quiz
撤消提交是否可以解决问题?搜索时找不到这样的东西。我正在使用 Zsh,作为记录。
我的 git 别名来自这个 repo: https://github.com/Prelang/g
最佳答案
Zsh interprets some aspects of the contents of double quotes .为确保 zsh 将您的字符串视为原始字符串并且不进行任何解释,您应该使用单引号:
git commit -m 'adds string.replace() quiz'
请注意,您的 git 别名中可能有双引号,这也可能会造成干扰。
关于Git 认为提交消息是未找到的命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37253507/