Linking to a line number in GitHub is easy: clicking on the line edits the URL to point to that line so we can share it.
However, if the file changes with a new commit, the line numbers may offset and this renders the existing links as inaccurate and confusing.
How to permanently link to a line of code in GitHub? Too often I came across old links for which the code changed.
Yet I have found that I can pick a commit's diff and link to that diff like this, here, on line 150
of base.py
for example:
https://github.com/deepmind/sonnet/commit/60be2bb4ccd74230285c1c822452a99558915c50#diff-62bce8ca7517a19cdfdee428fc985bf1R150
But I think linking to a specific commit is confusing (or a bit overkill) since the commit may not concern at all what I want to point to in the file.
Would anyone have a cleaner way to link to line numbers in GitHub? (E.g.: pointing to a specific file version rather than a commit would be cleaner IMO)