tags:

views:

55

answers:

3

How do you list your commits along with their SHA1 values in git?

+3  A: 

Exactly what format do you want? For just the one line summary and the SHA1:

git log --pretty=oneline

See git log --help for more formating options.

p00ya
Perfect. Exactly what I was looking for.
Daniel
A: 

I'm not sure what you mean. Listing a commit is listing its hash, and the easiest way to do it is with git rev-list.

$ git rev-list HEAD

will give the the reverse chronological list of all commits reachable from the current HEAD.

William Pursell
A: 

While P00ya's answer is correct, newer versions of git allow a simpler syntax:

git log --oneline

which is shorthand for git log --pretty=oneline --abbrev-commit used together.

Abizern