It’s a lot easier to point someone directly to a line of code you’re referring to, rather than sending them the link to a file with a message “and now scroll to line 74.”
First, you’ll navigate to a file hosted on GitHub. It could be a file you’ve checked in or any random file in any random repo.
Next, click on the line number that you want to get a link to. In today’s example, you’ll see me refer to one of my sample Electron apps where I forgot to remove the line that shows developer tools for debugging.
And volia, check your web browser address bar. You now have a URL for that exact line of code, e.g. https://github.com/saraford/your-moment-of-github-zen/blob/master/main.js#L74
When you send this link to someone else, the line of code will open around the middle of the screen with the yellow highlight.