3 ms·
BTW, when linking to a file in GitHub like this, you can link to a range of lines of the file, by using the URL fragment identifier, like: #L60-L92 https:
by neilv 2y ago
BTW, when linking to a file in GitHub like this, you can link to a range of lines of the file, by using the URL fragment identifier, like:
#L60-L92
https://github.com/kubernetes/kubernetes/blob/60c4c2b2521fb454ce69dee737e3eb91a25e0535/pkg/controller/volume/persistentvolume/pv_controller.go#L60-L92 https://github.com/kubernetes/kubernetes/blob/60c4c2b2521fb4...
- runlevel1 2y agoYou can click a line number to select the start of the range, then shift+click to select the end of the range to do this automatically.
- ivanjermakov 2y agoI think the whole file worth skimming through
- whalesalad 2y agoTry submitting a URL to HN that has an anchor tag and see what happens =)
- corytheboyd 2y agoI (well really, a coworker of mine) just today discovered a JetBrains action “Copy GitHub URL” [sic] that, if you have lines of code selected in the IDE, includes those lines in the copied URL fragment. So so so much better than my old workflow of stopping what I’m doing, going to the file in GitHub, and selecting the lines there to share links to bits of code.
- croemer 2y agoSame exists in VScode, probably need some GitHub extension for it.