Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 442
Matt Deeds Avatar asked May 25 '17 20:05

Matt Deeds


1 Answers

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.

like image 156
jthill Avatar answered Nov 15 '22 23:11

jthill