The original Markdown syntax documentation covers this; it says that you have to use multiple backticks to bracket the code expression, so like this:
``here you go - ` this was a backtick``
renders like this:
here you go - ` this was a backtick
If you want to include a backtick in normal text, not in a code block, a backslash escape does the trick; for example this:
Here's a backtick: \`; then, here's another one: \`
renders like this:
Here's a backtick: `; then, here's another one: `
As a commenter asked, “How can I have a code expression that contains only a backtick, or a sequence of multiple backticks?”
A single backtick can be written inline like this: `` ` ``
which, as you can see, renders like this: `
The rules is, if you want to write a sequence of backticks, the enclosing backticks (which must be written without whitespace between them) must be a different number of backticks from the quoted backticks. It does not have to be a greater number, only a different number. For example, seven backticks can be written like this: ` ``````` `
which then renders like so: ```````
Any number of consecutive backticks may be used as a code block delimiter. For example, an alternate form of the single backtick would be this: `````````` ` ``````````
which renders like so: `
(I tested this on commonmark and github and it behaves the same so it's not just a Stack Overflow oddity)