Hacker News new | ask | show | jobs
by brobinson 1643 days ago
FYI: when linking to a line of code, simply press Y on your keyboard to have Github switch from the _branchname/path/to/file.xyz_ URL to the _sha1/path/to/file.xyz_ URL. The former can result in your URL pointing to unrelated code if lines are added or removed in future commits on the referenced branch.

https://github.com/microsoft/opensource-management-portal/bl...

2 comments

TIL. Thanks!
Amusingly, this works on gitlab too. I was surprised that the shortcut was "so good that competitors had to implement it."
It's like Super+E: You never know you need it until you try it, and it doesn't work on your DE :-(