How to refer to a specific line or range of lines in github?

前端 未结 2 681
半阙折子戏
半阙折子戏 2021-02-12 16:40

If you want to add a reference to a specific line or a range of lines, it would be nice to get an URL that does that.

2条回答
  •  我寻月下人不归
    2021-02-12 17:01

    If you go the the file (or version of the file you want to refer to), click the line number (or hold shift down to select a range).

    => you will see that the URL changes (it adds something like #L21-L23 to the URL).

    Just copy the URL.

提交回复
热议问题