I am using gitk –all to view the git log. gitk does not display the sha hash for each commit. you need to manually click on the commit to view the sha hash. I want to see the sha hash and the branch name in a single view.
How to display the tag-names and branch names using the git log command.
With
git log(so, not gitk), you can use the decorate option (%d) in a pretty format, for displaying the branch name (but only for commits which are the HEAD of said branches):(you have to declare that alias with:
Then you can use it with ‘
git lgb‘. Note: you can name it with a different alias.)
Will give:
Update Git 2.2 (November 2014): see commit 9271095 from Harry Jeffery (
eXeC64):pretty: add%Dformat specifier