threads / discuss / 30063

Finding list of commit object

Subject: Finding list of commit object

## tl;dr

2 messages between Mar 26, 2012 and Mar 26, 2012.

replies: 1people: 2as markdown or json

Anjib Mulepati· Mar 26, 2012, 15:22 UTC · lore
Hi All,

I was doing some research on git objects. I understand that each object is represented with hash code and we can find the type of object with git cat command. I was wondering is there any command we can give to find the list of commit object (or any other object type) in current project without doing cat on each and every object inside .git/objects/

Thanks, Anjib

Shawn Pearce· Mar 26, 2012, 16:03 UTC · re: Anjib Mulepati · lore

Re: Finding list of commit object

On Mon, Mar 26, 2012 at 08:22, Anjib Mulepati <anjibcs@hotmail.com> wrote:
Show 5 quoted lines
> I was doing some research on git objects. I understand that each object is
> represented with hash code and we can find the type of object with git cat
> command. I was wondering is there any command we can give to find the list
> of commit object (or any other object type) in current project without doing
> cat on each and every object inside .git/objects/
git rev-list --all

That will list all commits, starting from each current branch or tag and walking backwards through history.

← back to recent threads