git log without tags
So I’m doing something like
git log --graph --pretty='%h %d %s' -n10
to get brief history of my recent commits.
The only issue I have is that most of the time I’m not interested in seeing the tags, only the branches. %d however shows both tags and branches. Is there some way I can only display branch names and not tags?
2 Solutions collect form web for “git log without tags”
git log --format="%C(auto) %h %s"
add this to your
[alias] blog = log --graph --oneline --pretty=format:'%Cred%h%Creset - %C(yellow)%s%Creset %C(green)<%an>%Creset %C(blue)@%d%Creset' --abbrev-commit
This way you get only the commit number, message how made the commit and in which branch it was committed. and you only have to type
git blog and you can look at colors when you want
and if you really only the branch name just do:
git log --graph --oneline --pretty=format:'%C(blue)@%d%Creset'