When I try to commit with a message containing the @
sign, I always end up tagging an user.
Example:
In this message, I'm referring to the @property
python decorator, not the github user named "property".
Can I escape this character and avoid creating a link to an user?
Thanks
There is a way to do it, but it's a bit hacky. Slai was very close to solving it. Instead of pasting the code for the zero width space, you need to paste the actual zero width space. Here is a test commit that shows that it works. Also here is some info about the zero width space character.
Note: The shortcut for Windows on the website does not work. It inserts ♂ instead.
Note2: Don't forget to thank Slai :)
As far as I know, there is no way to escape it.
Even if you try to use the escape sequence \@
or wrap the content within a code tag ``
, it will still be rendered as @mention
.
Here's two tests I tried:
$ git commit --allow-empty -m 'This is a \@test'
$ git commit --allow-empty -m 'This is a `@test`'
I also tried to use a longer commit message, and place the mention in the longer description. Once more, it did not escape it, neither with \
nor with ``
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With