Search results
27 paź 2022 · Click the line number, and then copy and paste the link from the address bar. To select a range, click the number, and then shift click the later number. Alternatively, the links are a relatively simple format, just append #L<number> to the end for that specific line number, using the link to the file.
6 sie 2013 · A better practice is to link to a specific commit, where the content of source files are not subject to versioning. To view a GitHub project at a certain commit, click on the tree link in the commit header, or just press t on your keyboard.
You can create a permanent link to a specific line or range of lines of code in a specific version of a file or pull request.
You can link to a specific line in the Markdown file the same way you can in code. Append #L with the line number or numbers at the end of the url. For example, github.com/<organization>/<repository>/blob/<branch_name>/README.md?plain=1#L14 will highlight line 14 in the plain README.md file.
20 gru 2019 · How to Link to a Snapshot of a Branch of a Specific Commit. Pointing to a specific file or files might be exactly what you want to achieve, but perhaps you want to point to the state of the whole branch when this commit was made. You can do this by clicking on “Browse files” on that specific commit.
4 mar 2017 · When sending URLs that link to files on github you may want to reference a specific line number or block of code. The people receiving your code snippets will appreciate these nice highlights, and (subconsciously or not) they'll be thinking, "damn, he's good".
21 cze 2018 · When answering questions on Stack Overflow or GitHub itself, I often have this process: Browse code in GitHub UI. Go to relevant file. Find relevant line. Click the margin of that line to get the URL to that specific line. The result: a link to e.g. .../my-lib/blob/master/src/main.ts#L123.