3

GitHub has a syntax to add a link to a specific commit using its hash like bec0001 that can be used on a commit message. Is there a syntax to add a link to a file on the same repository? Something like:

Cool commit

Doing something useful. See also file /package.json

Couldn't find anything in the docs: https://docs.github.com/en/github/writing-on-github/autolinked-references-and-urls

Also tried Relative link with ../blob/master/ and it didn't work on the commit message (only on the comments): /package.json

Ricardo
  • 3,696
  • 5
  • 36
  • 50

1 Answers1

0

No, not using a file path.

The "Autolinked references and URLs" mentions:

References to URLs, issues, pull requests, and commits are automatically shortened and converted into links.

So you could reference the URL of a file, but:

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250