我的问题
在编写提交消息时,我尝试使用“`”标记用代码格式化消息。
这是我的提交信息:
git commit -am"style(Nav.tsx): adheres to eslint rules
line 34 and 128: add newline padding
line 69 (nice): move function body to new line
line 89: navbarClassNames used to shorten line length later on
line 98: navbarClassNames now holds the class names of the navbar
line 98-110: shortened line length with new lines
line 96: nav is now camelCase
line 92 and 122: add `@returns` in docstrings"
执行命令后,我得到了这个
bash: @returns: command not found
[auth 57ee20c] style(Nav.tsx): adheres to eslint rules
1 file changed, 27 insertions(+), 6 deletions(-)
并且提交消息会中断。在 GitHub 上,有问题的行看起来像这样
line 92 and 122: add in docstrings
我试过的
我尝试过使用三个“`”的东西,我也尝试过使用<code></code>
当我使用“```”时,我得到相同的消息和问题,当我使用时<code></code>
,command not found
错误消失了,但提交消息保留了<code></code>
块而不是转换它。我也尝试过这样的字符串转义
line 92 and 122: add \`@returns\` in docstrings
和代码块一样,提交消息保留“`”而不是转换它。