Marco Marco - 1 year ago 107
Git Question

Github commit message escape "@" character

When I try to commit with a message containing the

sign, I always end up tagging an user.

In this message, I'm referring to the
python decorator, not the github user named "property".

Can I escape this character and avoid creating a link to an user?


Answer Source

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 ``.