This is a great little tip for any software developer, regardless of your programming language of choice. It's these subtle things that can raise you up regular programmer to coding superstar. When sending URLs that link to files on github you may want to reference a specific line number or block of code. The people receiving your code snippets will appreciate these nice highlights, and (subconsciously or not) they'll be thinking, "damn, he's good".
Clicking The Gutter
Notice that you can click on the line numbers of any line of code in the left-hand side of the code area on Github. This will highlight the line with yellow background, easily bringing it to the reader's attention.
Changing The URL
Clicking in the gutter will automatically change the URL in the address bar. Notice that when you click a line it appends to the end of the URL the characters "#L" followed by the line number. If you append another "#L" with a later line number then it will highlight those lines and also all the code between those two lines. For example, this link should jump to a file with lines 24 through 29 highlighted:
The posts on this site are written and maintained by Jim Lynch. About Jim...