Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, I can link to a specific line of an arbitrary tag and file, like this.

And I can link to an arbitrary sha1 and file, like this, but that's the raw file, so no way to link to a line there.

Is there a way to do sha1, file and line at the same time?

share|improve this question
up vote 3 down vote accepted

I took your original hash link, changed raw in URL to blob, added #L40, and got this. Is this the thing you wanted?

share|improve this answer
Exactly the solution I was going to suggest. – Ben Alpert Jul 11 '10 at 16:43
Yes, exactly what I wanted. Thanks! :) (just wish they would also show a yellow fadeout on the line selected...) – obvio171 Jul 12 '10 at 12:07

Short Answer: No

Long Answer

Line links are achieved by anchor links. After parsing the HTML document, you browser has the knowledge of these anchors and can position the top line of your view frame to requested anchor.


In this example, anchor is named L40.

On the other hand, raw files are text files and GitHub sends them as is with Content-type: text/html; charset=utf-8 header. Response content is displayed as is and there is no possibility to direct browser to a predefined offset.

share|improve this answer
Oh, yeah. I didn't mean if I could link to a line in the raw text file itself. The question was rather if there was a way to form a URL with sha1, file, and anchor to the appropriate line. – obvio171 Jul 11 '10 at 14:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.