I did
git commit -m "Changed function name `sum` to `sum_list`"
My intention with the backticks was that sum
and sum_list
be typed in a monospace font when someone views the commit message in GitHub or the like. It works like this in other contexts, for example in Markdown.
However this didn't work well. A git log
shows the following commit message:
Changed function name to
When I googled this, I only found this question about backtick commands, but both the asker and the answerer are already familiar with the concept I am trying to understand.
What do backticks do in commit messages? And is there a way to mark parts of the commit message as monospace font?
<some command> `subcommand` <end of main command>
or<some command> $(subcommand) <end of main command>
, where the subcommand is executed first, and its output is substituted to the subcommand in the main command. (The backticks syntax is the older one.) – Singer