Tuesday, 15 March 2011

Print git log without commit messages -



Print git log without commit messages -

i @ git log this

$ git log --graph --decorate --oneline -10 --all

but includes commit messages. how hide messages , obtain this?

* e12ed2d (master) * d190591 |\ * | dd28b78 | | * 4f959a8 (how-many-branches-do-you-have?) | |/ | | * 351e175 (yet-another-branch-name) | |/ | | * c04425a (other-branch-name) | |/ | | * d7f486c (branch-name) | | * 530eeb2 | | * bf1ad62

use --pretty=format:"" directive:

git log --graph --decorate -10 --all --pretty=format:"%cred%h%creset%c(yellow)%d%creset"

you can see options available here (table 2.1):

http://git-scm.com/book/en/git-basics-viewing-the-commit-history

git

No comments:

Post a Comment