Skip to content

gh browse -cn should return the commit view not tree view #6926

@sanjarcode

Description

@sanjarcode

Describe the feature or problem you’d like to solve

I want to get the URL for the latest commit (assuming it's pushed). I use gh browse -cn to get it in the terminal. It returns a "tree" URL and not a "commit" URL. This matters because I cannot view previous/next commits if I use this URL.

Proposed solution

Return a "commit" link instead of a "tree" link. Example (tree -> commit):

  • Current - https://github.com/exemplar-codes/codevolution-nodejs/tree/dbe29aebea4d32343f6f12c2f8d6ab62157a9595
  • Goal - https://github.com/exemplar-codes/codevolution-nodejs/commit/dbe29aebea4d32343f6f12c2f8d6ab62157a9595

Or at least have an option that does this (if backward compatibility is a goal)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocshelp wantedContributions welcomepriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions