Marco Marco - 3 months ago 28
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.

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

Answer

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

Comments