Use GitHub’s “Reference in new issue” feature to create an issue that links directly to a specific line of code. This is helpful when reporting bugs or asking questions about code in context.
Follow these steps:
Intentionally create a bug in your HTML file
Open your HTML file and add a small mistake. For example:
<img src="logo.png" alt="Logo"
(The closing >
is missing.)
Push the file to GitHub
Commit and push the change to your repository.
Go to the file on GitHub
In the repository view, navigate to the file with the bug.
Find the line with the bug
Scroll to the line you want to comment on.
Hover over the line number
A blue “+” icon will appear to the left of the line number.
Click the “+” icon
This opens a comment box next to the code.
Click “Reference in new issue”
This will open the New Issue page with the code line already quoted.