Skip to content

viewing/listing commits (with states and ids)  #777

Closed

Description

@sammypanda

Is it currently possible to view commits?

Initially, after searching through the manual, i couldn't find anything for just listing off the commits. I get why this hasn't been added, as it may come with the expectation that you can view a commit (meaning the code would need to be handled). But at the moment, I think it'd be handy to see commits by author/state and with ids so i could reference them in my workflow all in the terminal.

In addition, if it's possible to view the commits, a full list of # ids (and the matching issue/commit/etc) from #1 to the latest would be neat.

Activity

  1. mislav commented on Apr 13, 2020

    @mislav
    Contributor

    Hi, if your need is to list commits in a local git repository, could you achieve that by using git log or git rev-list?

    And could you tell us more about what do you mean with "states" and # ids in the context of commits?

    It's true that right now we offer no commands that list or query git commits and their Checks status. We do plan to add the ability to list Checks status for a pull request.

  2. sammypanda commented on Apr 13, 2020

    @sammypanda
    Author

    ah no worries about the states thing, that's all good, i can just use the git command. I just miss out on the pretty formatting, that's all hehe.

    the # ids i'm referring to that number on github that spans across some actions eg, this issue number id is #777 and the latest approved pull request is #771, the latest commit id would be 971e658 (i'm fairly certain commits don't use the same ids as pull requests and issues) - the list would just be in order of time.

    Sorry if i made anything confusing :)

  3. mislav commented on Apr 13, 2020

    @mislav
    Contributor

    Well, you still haven't made it clear about exactly what kind of functionality would you like to see.

    Let's start with a command that is already available to you: git log. It lists commits from the latest commit in the current branch until the first one in the repository. You can choose alternate output formats, including coloring, using extra arguments as described in git help log.

    What is missing in this output? For example, if any commits reference issue by ID e.g. This change fixes #123, this will be displayed normally. What extra information do you think GitHub CLI has the opportunity to add here?

    When I read your words:

    if it's possible to view the commits, a full list of # ids (and the matching issue/commit/etc) from #1 to the latest would be neat.

    I don't have a clear vision of what you are suggesting. When you say "view the commits", what kind of viewing are you envisioning that's different than using git log? When you say a “a full list of # ids from 1 to the latest”, which IDs are you referring to? A full list of what as it relates to what? Any more explanation about your use-case would be helpful. Thank you!

  4. billygriffin commented on Apr 13, 2020

    @billygriffin
    Contributor

    Hi @Samdvich. Adding onto what @mislav said, it sounds like varying ways of displaying git log may be best suited for this task. For example: https://coderwall.com/p/euwpig/a-better-git-log

    I'm going to close this issue and hopefully that helps, but if there are things you think belong in gh as opposed to git, we're open to revisiting. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLImore-info-neededMore info needed from user/contributor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions