Retrieve canonical URL on GitHub

September 21, 2020

When sharing a link to a file on Github, you can press "y" before copying the URL.

This will expand URL to its canonical form and never outdate even if somebody pushes changes to that file and line later.


screenshot github url before expanding


screenshot github url after expanding