Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Add 'y' shortcut to generate permalink to commit #267

@JonathonReinhart

Description

@JonathonReinhart

Problem

Frequently, people will share a link to a specific line of code in a file (e.g. a function name). However, this will usually be done on the main branch, which is likely to move. When the file contents change, the link may no longer point to the same line.

Solution

Both GitHub and GitLab support pressing y to generate a permalink. When a user presses y the URL in the address bar is updated with the ref (branch or tag) being replaced with the full commit SHA hash. This converts the URL into a "permalink". Note that a line number anchor is preserved.

Screen.recording.2022-09-12.10.35.19.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions