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
2010-02-25 03:51:37
Perfect. Exactly what I was looking for.
Daniel
2010-02-25 03:52:40
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
2010-02-25 05:56:38
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
2010-02-25 08:32:21