3

I like to look at my Git log like this

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

but it includes commit messages. How do I hide messages and obtain something like 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

1 Answer 1

3

Use the --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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.