Re:This needs some heavy checking... (line 1029)
by whalesalad on Wednesday February 09, 2022 @04:34PM
(#30278849)
Another fun github hack: if you browse the repo for a particular file, the URL will be something like
github.com/user/repo/blob/master/foo/bar/baz.py
But this file can change, meaning this url might not have the same content a week or month down the road. This is particularly troublesome when you have lines selected. To fix this, press `y` and your url will get expanded to include the current commit hash: github.com/user/repo/blob/e4ecae.../foo/bar/baz.py
Now your URL is safe to share.
Re:This needs some heavy checking... (line 1029)
by umvi on Wednesday February 09, 2022 @04:41PM
(#30278935)
You can also change "github.com" to "github1s.com" or "github.dev" if you want to view it in VSCode in browser.
i.e.
https://github.dev/torvalds/linux/blob/f4bc5bbb5fef3cf421ba3...
https://github1s.com/torvalds/linux/blob/f4bc5bbb5fef3cf421b...
Re:This needs some heavy checking... (line 1029)
by thunderbong on Wednesday February 09, 2022 @04:57PM
(#30279120)
Or just press '.' if you're logged in
Re:This needs some heavy checking... (line 1029)
by pan69 on Wednesday February 09, 2022 @04:29PM
(#30278770)
Or just click on the line number to change the URL to that line.
Re:This needs some heavy checking... (line 1029)
by gabrielsroka on Wednesday February 09, 2022 @05:06PM
(#30279212)
And shift-click on a second line to select a block.
Re:This needs some heavy checking... (line 1029)
by dennis_moore on Thursday February 10, 2022 @01:10AM
(#30282950)
I tried that but everything after the # got stripped when I submitted the link.
https://github.com/torvalds/linux/blob/f4bc5bbb5fef3cf421ba3...