Can "git log" show branches only (not the intermediate commits)?

0

Issue

I’d like to be able to see the relationship between all my branches.

Git log is a beautiful thing:

git log --graph --all --format=oneline

The output it produces is quite verbose (since I tend to make a lot of small commits on each branch). What I am looking for is a way to show only the commits that correspond to the head of a branch (just the branch name without the commit summary is fine)

Are there flags to git log or another git command for this?

Solution

You’re after the --no-walk option. (also --branches instead of --all, I’d guess).

From comments, you want the output gitk’s “simple history” produces. Gitk uses --simplify-by-decoration to get that.

Answered By – jthill

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More