How to Make a Link in GitHub: Anchors, References, and Repository URLs Explained

GitHub isn't just a place to store code — it's a collaborative workspace where linking is part of the workflow. Whether you're connecting to a file in your repo, referencing an issue, or adding a clickable URL inside a README, GitHub supports several distinct types of links. How you make a link depends entirely on where you're linking and what you're linking to.

The Two Environments Where GitHub Links Live

Before diving into syntax, it helps to understand the two main contexts:

  • Markdown files (READMEs, wikis, documentation, pull request descriptions, issue comments) — these render formatted text and support Markdown link syntax.
  • Raw file paths and repository URLs — these are direct web addresses to specific content inside a repo, and they follow GitHub's URL structure rather than Markdown rules.

Both are useful. Which one you need depends on what you're trying to accomplish.

How to Create a Clickable Link in Markdown

GitHub uses GitHub Flavored Markdown (GFM), which supports standard Markdown link syntax: