You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
viewing/listing commits (with states and ids) #777
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.
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.
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.
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!
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!
Activity
mislav commentedon Apr 13, 2020
Hi, if your need is to list commits in a local git repository, could you achieve that by using
git logorgit rev-list?And could you tell us more about what do you mean with "states" and
# idsin 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.
sammypanda commentedon Apr 13, 2020
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 :)
mislav commentedon Apr 13, 2020
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 ingit 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:
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!billygriffin commentedon Apr 13, 2020
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
ghas opposed togit, we're open to revisiting. Thanks!