How Do I Commit Code Blocks in My Git Commit Messages
My Problem While Writing a Commit Message, I Tried to Use the " ` " Mark to Format the Message with Code. This Is My Commit Message: Git Commit -Am"Style(Nav...
My problem
While writing a commit message, I tried to use the " ` " mark to format the message with code.
This is my commit message:
git commit -am"style(Nav.tsx): adheres to eslint rules
line 92 and 122: add `@returns` in docstrings"
After I execute the command, I get this
bash: @returns: command not found
[auth 57ee20c] style(Nav.tsx): adheres to eslint rules
1 file changed, 27 insertions(+), 6 deletions(-)
And the commit message cuts off. On GitHub, the line in question looks like this
line 92 and 122: add in docstrings
Must Read
What I have tried
I have tried using three of the " ` " thingies and I have also tried using <code></code>
When I use "", I get the same message and problem, and when I use <code></code>, the command not found error is gone, but the commit message retains the <code></code> blocks instead of converting it. I have also tried string escaping like this
line 92 and 122: add \`@returns\` in docstrings
And the like the code blocks, the commit message retains the " ` " instead of converting it.